Skip to content

Commit

Permalink
Add chatinvite command
Browse files Browse the repository at this point in the history
Add mentioned stickers' pack links to README.md
  • Loading branch information
evgfilim1 committed Jan 2, 2023
1 parent b64d51f commit f9442e5
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ About:
Chat administration:
• chatban|chatrestrict <reply 'reply'|id> [timespec] [perms] [reason...] — Restricts or bans a user in a chat
• chatcleardel — Kicks Deleted Accounts from the chat
• chatinvite <userid> — Invites a user to the current chat
• chatunban <reply 'reply'|id> — Unbans a user in a chat
• no_react2ban|noreact2ban <reply> — Stops react2ban on the message
• pin <reply> ['silent'] — Pins the message
Expand Down Expand Up @@ -124,11 +125,11 @@ everywhere by default. To check if a hook is enabled or disabled, use `.hooksher
- Sends a duck emoji (🦆) when someone writes "дак" (pronounced as "duck") or "кря"
(pronounces as "krya", English equivalent is "quack")
- Sends a pancake emoji (🥞) when someone writes "блин" (English equivalent is "pancake", also
that's how Russian equivalent to the English "f*ck" is "censored")
that's how Russian equivalent to the English "f*ck" may be "censored")
- `tap`: Sends a sticker with a finger touching a seal when someone writes "тык" or sends that
sticker itself
sticker itself ([link to the pack](https://t.me/addstickers/belek_vk))
- `mibib`: Sends a sticker (with 20% chance) with an animated pixelated bear when someone sends that
sticker itself
sticker itself ([link to the pack](https://t.me/addstickers/bttv_hlam))
- `bra`: Sends a picture from [this](https://www.reddit.com/r/anime_irl/comments/u4zxol/anime_irl/)
Reddit post when someone sends "бра" or "bra"
- `uwu`: Sends a [picture](https://imgur.com/a/bDzntL5) when someone sends "uwu", "owo", "уву"
Expand Down
7 changes: 6 additions & 1 deletion locales/evgfilim1-userbot.pot
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ msgid ""
msgstr ""
"Project-Id-Version: evgfilim1/userbot 0.5.x\n"
"Report-Msgid-Bugs-To: https://github.com/evgfilim1/userbot/issues\n"
"POT-Creation-Date: 2023-01-03 01:03+0500\n"
"POT-Creation-Date: 2023-01-03 01:10+0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down Expand Up @@ -251,6 +251,11 @@ msgid_plural "<i>({n} members checked)</i>"
msgstr[0] ""
msgstr[1] ""

#: userbot/commands/chat_admin.py:472
#, python-brace-format
msgid "User {user_id} has been invited to the chat"
msgstr ""

#: userbot/commands/chat_info.py:94
#, python-brace-format
msgid "{icon} <b>New chat avatar was set!</b> <a href='{msg_link}'>Source</a>\n"
Expand Down
7 changes: 7 additions & 0 deletions userbot/commands/chat_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,3 +463,10 @@ async def kick_deleted_accounts(
total,
).format(n=total)
return f"{icons.PERSON_BLOCK} {kicked_text} {total_checked_text}"


@commands.add("chatinvite", usage="<userid>")
async def invite_to_chat(message: Message, command: CommandObject) -> None:
"""Invites a user to the current chat"""
await message.chat.add_members(command.args)
return _("User {user_id} has been invited to the chat").format(user_id=command.args)

0 comments on commit f9442e5

Please sign in to comment.