Exemplo n.º 1
0
async def setfloodaction(message: Message, chat: dict, strings: dict):
    SUPPORTED_ACTIONS = ["kick", "ban", "mute", "tmute", "tban"]  # noqa
    if (action := message.get_args().lower()) not in SUPPORTED_ACTIONS:
        return await message.reply(
            strings["invalid_args"].format(
                supported_actions=", ".join(SUPPORTED_ACTIONS)
            )
        )
Exemplo n.º 2
0
async def setfloodaction(message: Message, chat: dict, strings: dict):
    SUPPORTED_ACTIONS = ['kick', 'ban', 'mute']  # noqa
    if (action := message.get_args().lower()) not in SUPPORTED_ACTIONS:
        return await message.reply(strings['invalid_args'].format(
            supported_actions=", ".join(SUPPORTED_ACTIONS)))