Fixes and improvements
This commit is contained in:
parent
7aafdf6c19
commit
822693decc
@ -4,8 +4,8 @@
|
||||
"name": "English",
|
||||
"codes": [
|
||||
"en",
|
||||
"en-US",
|
||||
"en-GB"
|
||||
"en-GB",
|
||||
"en-US"
|
||||
]
|
||||
},
|
||||
"commands": {
|
||||
@ -27,7 +27,7 @@
|
||||
"captcha_mistake": "Invalid answer. Remaining attempts: {remaining}.",
|
||||
"captcha_passed": "You have passed the captcha. Welcome!",
|
||||
"locale_set": "Group's language is now: {locale}",
|
||||
"nothing": "This actions has already been finished.",
|
||||
"nothing": "This action has already been finished.",
|
||||
"wrong_user": "This message is not for you."
|
||||
},
|
||||
"buttons": {
|
||||
|
@ -11,7 +11,7 @@ from classes.pyrogroup import PyroGroup
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@PyroClient.on_callback_query(filters.regex(r"ban;[\s\S]*"))
|
||||
@PyroClient.on_callback_query(filters.regex(r"ban;[\s\S]*")) # type: ignore
|
||||
async def callback_ban(app: PyroClient, callback: CallbackQuery):
|
||||
group = await PyroGroup.create_if_not_exists(callback.message.chat.id, None, True)
|
||||
locale = group.select_locale(app, callback.message.from_user)
|
||||
|
@ -16,7 +16,7 @@ from classes.pyrogroup import PyroGroup
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@PyroClient.on_callback_query(filters.regex(r"emoji;[\s\S]*"))
|
||||
@PyroClient.on_callback_query(filters.regex(r"emoji;[\s\S]*")) # type: ignore
|
||||
async def callback_emoji_button(app: PyroClient, callback: CallbackQuery):
|
||||
parsed = CallbackEmoji.from_callback(callback)
|
||||
group = await PyroGroup.create_if_not_exists(callback.message.chat.id, None, True)
|
||||
|
@ -5,7 +5,7 @@ from classes.pyroclient import PyroClient
|
||||
from classes.pyrogroup import PyroGroup
|
||||
|
||||
|
||||
@PyroClient.on_callback_query(filters.regex(r"nothing"))
|
||||
@PyroClient.on_callback_query(filters.regex(r"nothing")) # type: ignore
|
||||
async def callback_nothing(app: PyroClient, callback: CallbackQuery):
|
||||
group = await PyroGroup.create_if_not_exists(callback.message.chat.id, None, True)
|
||||
locale = group.select_locale(app, callback.message.from_user)
|
||||
|
@ -17,7 +17,7 @@ from modules.utils import get_captcha_image
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@PyroClient.on_callback_query(filters.regex(r"verify;[\s\S]*"))
|
||||
@PyroClient.on_callback_query(filters.regex(r"verify;[\s\S]*")) # type: ignore
|
||||
async def callback_verify(app: PyroClient, callback: CallbackQuery):
|
||||
parsed = CallbackVerify.from_callback(callback)
|
||||
group = await PyroGroup.create_if_not_exists(callback.message.chat.id, None, True)
|
||||
|
@ -9,7 +9,7 @@ from classes.pyrogroup import PyroGroup
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@PyroClient.on_message(filters.new_chat_members & filters.group & filters.me)
|
||||
@PyroClient.on_message(filters.new_chat_members & filters.group & filters.me) # type: ignore
|
||||
async def handler_bot_join(app: PyroClient, message: Message):
|
||||
logger.info("Bot has joined the group %s")
|
||||
await PyroGroup.create_if_not_exists(message.chat.id, None, True)
|
||||
|
@ -21,7 +21,7 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@PyroClient.on_message(
|
||||
filters.new_chat_members & filters.group & ~filters.me & ~filters.bot
|
||||
filters.new_chat_members & filters.group & ~filters.me & ~filters.bot # type: ignore
|
||||
)
|
||||
async def handler_user_join(app: PyroClient, message: Message):
|
||||
group = await PyroGroup.create_if_not_exists(message.chat.id, None, True)
|
||||
|
Reference in New Issue
Block a user