예제 #1
0
async def _(event):
    if event.fwd_from:
        return
    input_str = event.pattern_match.group(1)
    try:
        sql.set_flood(event.chat_id, input_str)
        CHAT_FLOOD = sql.__load_flood_settings()
        await event.edit("Antiflood updated to {} in the current chat".format(input_str))
    except Exception as e:  # pylint:disable=C0103,W0703
        await event.edit(str(e))
예제 #2
0
async def _(event):
    if event.fwd_from:
        return
    input_str = event.pattern_match.group(1)
    try:
        sql.set_flood(event.chat_id, input_str)
        sql.__load_flood_settings()
        await event.edit(
            "**Antiflood diperbarui menjadi** `{}` **dalam obrolan saat ini**".
            format(input_str))
    except Exception as e:  # pylint:disable=C0103,W0703
        await event.edit(str(e))
예제 #3
0
async def _(event):
    if event.fwd_from:
        return
    input_str = event.pattern_match.group(1)
    try:
        sql.set_flood(event.chat_id, input_str)
        sql.__load_flood_settings()
        await edit_or_reply(
            event,
            f"**Antiflood diperbarui menjadi** `{input_str}` **dalam obrolan saat ini**",
        )
    except Exception as e:
        await edit_or_reply(event, f"{e}")