From 4d2b2c65ebd7e2c11e3a02ba2dc993ad606f5060 Mon Sep 17 00:00:00 2001 From: blank X Date: Tue, 28 Sep 2021 22:25:54 +0700 Subject: [PATCH] Don't handle scheduled messages --- sukuinote/plugins/admins.py | 2 +- sukuinote/plugins/anilist.py | 2 +- sukuinote/plugins/cat.py | 2 +- sukuinote/plugins/delete.py | 8 ++++---- sukuinote/plugins/einfo.py | 4 ++-- sukuinote/plugins/files.py | 6 +++--- sukuinote/plugins/help.py | 2 +- sukuinote/plugins/info.py | 4 ++-- sukuinote/plugins/log_forwards.py | 2 +- sukuinote/plugins/log_reports.py | 2 +- sukuinote/plugins/loli.py | 2 +- sukuinote/plugins/nekos.py | 2 +- sukuinote/plugins/ping.py | 2 +- sukuinote/plugins/poweroff.py | 2 +- sukuinote/plugins/pyexec.py | 6 +++--- sukuinote/plugins/saucenao.py | 2 +- sukuinote/plugins/shell.py | 2 +- sukuinote/plugins/translate.py | 2 +- sukuinote/plugins/ud.py | 2 +- sukuinote/plugins/whatanime.py | 2 +- sukuinote/plugins/wikipedia.py | 2 +- 21 files changed, 30 insertions(+), 30 deletions(-) diff --git a/sukuinote/plugins/admins.py b/sukuinote/plugins/admins.py index 6a79614..aec40a3 100644 --- a/sukuinote/plugins/admins.py +++ b/sukuinote/plugins/admins.py @@ -30,7 +30,7 @@ def _generate_sexy(entity, ping, is_creator): sexy_text += ' [CREATOR]' return sexy_text -@Client.on_message(~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.me & filters.command(['admin', 'admins'], prefixes=config['config']['prefixes'])) +@Client.on_message(~filters.scheduled & ~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.me & filters.command(['admin', 'admins'], prefixes=config['config']['prefixes'])) @log_errors @public_log_errors async def admins(client, message): diff --git a/sukuinote/plugins/anilist.py b/sukuinote/plugins/anilist.py index 40e6d89..e07c591 100644 --- a/sukuinote/plugins/anilist.py +++ b/sukuinote/plugins/anilist.py @@ -5,7 +5,7 @@ from pyrogram.errors.exceptions.forbidden_403 import Forbidden from pyrogram.errors.exceptions.bad_request_400 import ChatSendInlineForbidden from .. import slave, config, help_dict, log_errors, public_log_errors -@Client.on_message(~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.me & filters.command(['anilist', 'al', 'alc', 'alchar', 'alcharacter', 'anilistc', 'anilistchar', 'anilistcharacter'], prefixes=config['config']['prefixes'])) +@Client.on_message(~filters.scheduled & ~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.me & filters.command(['anilist', 'al', 'alc', 'alchar', 'alcharacter', 'anilistc', 'anilistchar', 'anilistcharacter'], prefixes=config['config']['prefixes'])) @log_errors @public_log_errors async def anilist(client, message): diff --git a/sukuinote/plugins/cat.py b/sukuinote/plugins/cat.py index fc1fae5..d6b7834 100644 --- a/sukuinote/plugins/cat.py +++ b/sukuinote/plugins/cat.py @@ -4,7 +4,7 @@ import tempfile from pyrogram import Client, filters from .. import config, help_dict, log_errors, session, progress_callback, public_log_errors -@Client.on_message(~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.me & filters.command('cat', prefixes=config['config']['prefixes'])) +@Client.on_message(~filters.scheduled & ~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.me & filters.command('cat', prefixes=config['config']['prefixes'])) @log_errors @public_log_errors async def cat(client, message): diff --git a/sukuinote/plugins/delete.py b/sukuinote/plugins/delete.py index f9205c0..a0e0f04 100644 --- a/sukuinote/plugins/delete.py +++ b/sukuinote/plugins/delete.py @@ -3,7 +3,7 @@ import asyncio from pyrogram import Client, filters from .. import config, help_dict, log_errors, public_log_errors -@Client.on_message(~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.me & filters.command(['d', 'del', 'delete'], prefixes=config['config']['prefixes'])) +@Client.on_message(~filters.scheduled & ~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.me & filters.command(['d', 'del', 'delete'], prefixes=config['config']['prefixes'])) @log_errors @public_log_errors async def delete(client, message): @@ -18,7 +18,7 @@ async def delete(client, message): break await client.delete_messages(message.chat.id, messages) -@Client.on_message(~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.me & filters.command(['da', 'deleteall'], prefixes=config['config']['prefixes'])) +@Client.on_message(~filters.scheduled & ~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.me & filters.command(['da', 'deleteall'], prefixes=config['config']['prefixes'])) @log_errors @public_log_errors async def deleteall(client, message): @@ -28,7 +28,7 @@ async def deleteall(client, message): return await client.delete_user_history(message.chat.id, reply.from_user.id) -@Client.on_message(~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.me & filters.command(['p', 'purge', 'sp', 'selfpurge'], prefixes=config['config']['prefixes'])) +@Client.on_message(~filters.scheduled & ~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.me & filters.command(['p', 'purge', 'sp', 'selfpurge'], prefixes=config['config']['prefixes'])) @log_errors @public_log_errors async def purge(client, message): @@ -61,7 +61,7 @@ async def purge(client, message): yeetpurge_info = {True: dict(), False: dict()} yeetpurge_lock = asyncio.Lock() -@Client.on_message(~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.me & filters.command(['yp', 'yeetpurge', 'syp', 'selfyeetpurge'], prefixes=config['config']['prefixes'])) +@Client.on_message(~filters.scheduled & ~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.me & filters.command(['yp', 'yeetpurge', 'syp', 'selfyeetpurge'], prefixes=config['config']['prefixes'])) @log_errors @public_log_errors async def yeetpurge(client, message): diff --git a/sukuinote/plugins/einfo.py b/sukuinote/plugins/einfo.py index 06cf7bb..391c2fb 100644 --- a/sukuinote/plugins/einfo.py +++ b/sukuinote/plugins/einfo.py @@ -50,7 +50,7 @@ DEAI_MODULE_CODES = { "8": "Codename Gestapo" } -@Client.on_message(~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.me & filters.command(['einfo', 'externalinfo', 'sw', 'spamwatch', 'deai', 'spb', 'spamprotection', 'cas', 'combot', 'rose'], prefixes=config['config']['prefixes'])) +@Client.on_message(~filters.scheduled & ~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.me & filters.command(['einfo', 'externalinfo', 'sw', 'spamwatch', 'deai', 'spb', 'spamprotection', 'cas', 'combot', 'rose'], prefixes=config['config']['prefixes'])) @log_errors @public_log_errors async def fedstat(client, message): @@ -200,7 +200,7 @@ async def get_spam_protection(entity): return text return f'- {json["response_code"]}: {json["error"]["error_code"]}: {json["error"]["type"]}: {html.escape(json["error"]["message"])}' -@Client.on_message(~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.chat(['rsophiebot', 'missrose_bot']) & filters.incoming & filters.regex('^Federation ban info:\n|You aren\'t fbanned in this fed\.|^Failed to get user: unable to getChatMember: Bad Request: chat not found$|^(?:.+ )?is not banned in this fed\.$|^(?:.+ )?is currently banned in Rose Support Official, for the following reason:\n\n|^Looks like I don\'t have control over that user, or the ID isn\'t a valid one\. If you reply to one of their messages, I\'ll be able to interact with them\.$')) +@Client.on_message(~filters.scheduled & ~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.chat(['rsophiebot', 'missrose_bot']) & filters.incoming & filters.regex('^Federation ban info:\n|You aren\'t fbanned in this fed\.|^Failed to get user: unable to getChatMember: Bad Request: chat not found$|^(?:.+ )?is not banned in this fed\.$|^(?:.+ )?is currently banned in Rose Support Official, for the following reason:\n\n|^Looks like I don\'t have control over that user, or the ID isn\'t a valid one\. If you reply to one of their messages, I\'ll be able to interact with them\.$')) async def fedstat_conversation_hack(client, message): reply = message.reply_to_message if not getattr(reply, 'empty', True): diff --git a/sukuinote/plugins/files.py b/sukuinote/plugins/files.py index 8c94d01..06f46ea 100644 --- a/sukuinote/plugins/files.py +++ b/sukuinote/plugins/files.py @@ -4,7 +4,7 @@ from pyrogram import Client, filters from pyrogram.errors.exceptions.bad_request_400 import MessageIdInvalid from .. import config, help_dict, log_errors, session, progress_callback, public_log_errors -@Client.on_message(~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.me & filters.command(['ls', 'hls', 'hiddenls'], prefixes=config['config']['prefixes'])) +@Client.on_message(~filters.scheduled & ~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.me & filters.command(['ls', 'hls', 'hiddenls'], prefixes=config['config']['prefixes'])) @log_errors @public_log_errors async def ls(client, message): @@ -28,7 +28,7 @@ async def ls(client, message): text += f'{html.escape(i)}\n' await message.reply_text(text or 'Empty', disable_web_page_preview=True) -@Client.on_message(~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.me & filters.command(['ul', 'upload'], prefixes=config['config']['prefixes'])) +@Client.on_message(~filters.scheduled & ~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.me & filters.command(['ul', 'upload'], prefixes=config['config']['prefixes'])) @log_errors @public_log_errors async def upload(client, message): @@ -44,7 +44,7 @@ async def upload(client, message): else: await reply.delete() -@Client.on_message(~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.me & filters.command(['dl', 'download'], prefixes=config['config']['prefixes'])) +@Client.on_message(~filters.scheduled & ~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.me & filters.command(['dl', 'download'], prefixes=config['config']['prefixes'])) @log_errors @public_log_errors async def download(client, message): diff --git a/sukuinote/plugins/help.py b/sukuinote/plugins/help.py index fc8a2c0..e9df925 100644 --- a/sukuinote/plugins/help.py +++ b/sukuinote/plugins/help.py @@ -4,7 +4,7 @@ from pyrogram.errors.exceptions.forbidden_403 import Forbidden from pyrogram.errors.exceptions.bad_request_400 import ChatSendInlineForbidden from .. import slave, config, help_dict, log_errors, public_log_errors -@Client.on_message(~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.me & filters.command('help', prefixes=config['config']['prefixes'])) +@Client.on_message(~filters.scheduled & ~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.me & filters.command('help', prefixes=config['config']['prefixes'])) @log_errors @public_log_errors async def help(client, message): diff --git a/sukuinote/plugins/info.py b/sukuinote/plugins/info.py index b4b6fe5..54d0353 100644 --- a/sukuinote/plugins/info.py +++ b/sukuinote/plugins/info.py @@ -29,7 +29,7 @@ def _generate_sexy(entity, ping): sexy_text += ' [FAKE]' return sexy_text -@Client.on_message(~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.me & filters.command(['info', 'whois'], prefixes=config['config']['prefixes'])) +@Client.on_message(~filters.scheduled & ~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.me & filters.command(['info', 'whois'], prefixes=config['config']['prefixes'])) @log_errors @public_log_errors async def info(client, message): @@ -77,7 +77,7 @@ async def info(client, message): except MessageNotModified: pass -@Client.on_message(~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.me & filters.command('id', prefixes=config['config']['prefixes'])) +@Client.on_message(~filters.scheduled & ~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.me & filters.command('id', prefixes=config['config']['prefixes'])) @log_errors @public_log_errors async def id(client, message): diff --git a/sukuinote/plugins/log_forwards.py b/sukuinote/plugins/log_forwards.py index d8728d5..c3abc29 100644 --- a/sukuinote/plugins/log_forwards.py +++ b/sukuinote/plugins/log_forwards.py @@ -8,7 +8,7 @@ logged = defaultdict(set) lock = asyncio.Lock() force_ltr = '\u200E' -@Client.on_message(~filters.chat(config['config']['log_chat']) & filters.incoming & filters.forwarded & (filters.group | filters.channel)) +@Client.on_message(~filters.scheduled & ~filters.chat(config['config']['log_chat']) & filters.incoming & filters.forwarded & (filters.group | filters.channel)) @log_errors async def log_forwards(client, message): if not config['config'].get('log_forwards'): diff --git a/sukuinote/plugins/log_reports.py b/sukuinote/plugins/log_reports.py index 4641ad6..5089bdb 100644 --- a/sukuinote/plugins/log_reports.py +++ b/sukuinote/plugins/log_reports.py @@ -8,7 +8,7 @@ reported = defaultdict(set) lock = asyncio.Lock() force_ltr = '\u200E' -@Client.on_message(~filters.chat(config['config']['log_chat']) & filters.regex(r'(?:^|\s+)@admins?(?:$|\W+)|^[/!#](?:report|admins?)(?:$|\W+)') & filters.group) +@Client.on_message(~filters.scheduled & ~filters.chat(config['config']['log_chat']) & filters.regex(r'(?:^|\s+)@admins?(?:$|\W+)|^[/!#](?:report|admins?)(?:$|\W+)') & filters.group) @log_errors async def log_reports(client, message): if not config['config']['log_reports']: diff --git a/sukuinote/plugins/loli.py b/sukuinote/plugins/loli.py index 32d4202..532fca9 100644 --- a/sukuinote/plugins/loli.py +++ b/sukuinote/plugins/loli.py @@ -3,7 +3,7 @@ from pyrogram.types.messages_and_media import Photo from pyrogram.errors.exceptions.forbidden_403 import Forbidden from .. import slave, config, help_dict, log_errors, public_log_errors -@Client.on_message(~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.me & filters.command(['loli', 'sfwloli', 'sloli', 'nsfwloli', 'nloli'], prefixes=config['config']['prefixes'])) +@Client.on_message(~filters.scheduled & ~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.me & filters.command(['loli', 'sfwloli', 'sloli', 'nsfwloli', 'nloli'], prefixes=config['config']['prefixes'])) @log_errors @public_log_errors async def loli(client, message): diff --git a/sukuinote/plugins/nekos.py b/sukuinote/plugins/nekos.py index 2ed2fa8..513a5a8 100644 --- a/sukuinote/plugins/nekos.py +++ b/sukuinote/plugins/nekos.py @@ -10,7 +10,7 @@ from .. import config, help_dict, log_errors, session, slave, public_log_errors help_text = '' def _generate(i): - @Client.on_message(~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.me & filters.command(i, prefixes=config['config']['prefixes'])) + @Client.on_message(~filters.scheduled & ~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.me & filters.command(i, prefixes=config['config']['prefixes'])) @log_errors @public_log_errors async def func(client, message): diff --git a/sukuinote/plugins/ping.py b/sukuinote/plugins/ping.py index 6414c11..1875bc0 100644 --- a/sukuinote/plugins/ping.py +++ b/sukuinote/plugins/ping.py @@ -7,7 +7,7 @@ strings = { 'pong': 'Ping!' } -@Client.on_message(~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.me & filters.command(['ping', 'pong'], prefixes=config['config']['prefixes'])) +@Client.on_message(~filters.scheduled & ~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.me & filters.command(['ping', 'pong'], prefixes=config['config']['prefixes'])) @log_errors @public_log_errors async def ping_pong(client, message): diff --git a/sukuinote/plugins/poweroff.py b/sukuinote/plugins/poweroff.py index 43a28be..17c2fef 100644 --- a/sukuinote/plugins/poweroff.py +++ b/sukuinote/plugins/poweroff.py @@ -3,7 +3,7 @@ import signal from pyrogram import Client, filters from .. import config, help_dict, log_errors, public_log_errors -@Client.on_message(~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.me & filters.command(['poweroff', 'shutdown', 'stop'], prefixes=config['config']['prefixes'])) +@Client.on_message(~filters.scheduled & ~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.me & filters.command(['poweroff', 'shutdown', 'stop'], prefixes=config['config']['prefixes'])) @log_errors @public_log_errors async def poweroff(client, message): diff --git a/sukuinote/plugins/pyexec.py b/sukuinote/plugins/pyexec.py index 522cb70..0625600 100644 --- a/sukuinote/plugins/pyexec.py +++ b/sukuinote/plugins/pyexec.py @@ -12,7 +12,7 @@ from .. import config, help_dict, log_errors, slave, apps, session, public_log_e exec_tasks = dict() PYEXEC_REGEX = '^(?:' + '|'.join(map(re.escape, config['config']['prefixes'])) + r')exec\s+([\s\S]+)$' -@Client.on_message(~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.me & filters.regex(PYEXEC_REGEX)) +@Client.on_message(~filters.scheduled & ~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.me & filters.regex(PYEXEC_REGEX)) @log_errors @public_log_errors async def pyexec(client, message): @@ -91,7 +91,7 @@ async def pyexec(client, message): else: await reply.edit_text(output) -@Client.on_message(~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.me & filters.command(['listexecs', 'listexec', 'lexec'], prefixes=config['config']['prefixes'])) +@Client.on_message(~filters.scheduled & ~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.me & filters.command(['listexecs', 'listexec', 'lexec'], prefixes=config['config']['prefixes'])) @log_errors @public_log_errors async def listexec(client, message): @@ -104,7 +104,7 @@ async def listexec(client, message): text = '\n'.join(map(lambda i: f'{i}', exec_tasks)) await message.reply_text(text or 'No tasks') -@Client.on_message(~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.me & filters.command(['cancelexec', 'cexec'], prefixes=config['config']['prefixes'])) +@Client.on_message(~filters.scheduled & ~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.me & filters.command(['cancelexec', 'cexec'], prefixes=config['config']['prefixes'])) @log_errors @public_log_errors async def cancelexec(client, message): diff --git a/sukuinote/plugins/saucenao.py b/sukuinote/plugins/saucenao.py index d8b4669..5d20271 100644 --- a/sukuinote/plugins/saucenao.py +++ b/sukuinote/plugins/saucenao.py @@ -23,7 +23,7 @@ async def download_file(url, filename, referer=None): return True file.write(chunk) -@Client.on_message(~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.me & filters.command(['saucenao', 'sauce'], prefixes=config['config']['prefixes'])) +@Client.on_message(~filters.scheduled & ~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.me & filters.command(['saucenao', 'sauce'], prefixes=config['config']['prefixes'])) @log_errors @public_log_errors async def saucenao(client, message): diff --git a/sukuinote/plugins/shell.py b/sukuinote/plugins/shell.py index 7bad6be..0792120 100644 --- a/sukuinote/plugins/shell.py +++ b/sukuinote/plugins/shell.py @@ -6,7 +6,7 @@ from pyrogram import Client, filters from .. import config, help_dict, log_errors, public_log_errors SHELL_REGEX = '^(?:' + '|'.join(map(re.escape, config['config']['prefixes'])) + r')(?:(?:ba)?sh|shell|term(?:inal)?)\s+(.+)(?:\n([\s\S]+))?$' -@Client.on_message(~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.me & filters.regex(SHELL_REGEX)) +@Client.on_message(~filters.scheduled & ~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.me & filters.regex(SHELL_REGEX)) @log_errors @public_log_errors async def shell(client, message): diff --git a/sukuinote/plugins/translate.py b/sukuinote/plugins/translate.py index 9c17ffe..f9b2a59 100644 --- a/sukuinote/plugins/translate.py +++ b/sukuinote/plugins/translate.py @@ -7,7 +7,7 @@ from .. import config, help_dict, log_errors, public_log_errors PROBLEM_CODES = set(i for i in googletrans.LANGUAGES if '-' in i) ZWS = '\u200B' -@Client.on_message(~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.me & filters.command(['tr', 'translate'], prefixes=config['config']['prefixes'])) +@Client.on_message(~filters.scheduled & ~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.me & filters.command(['tr', 'translate'], prefixes=config['config']['prefixes'])) @log_errors @public_log_errors async def translate(client, message): diff --git a/sukuinote/plugins/ud.py b/sukuinote/plugins/ud.py index ed44de7..0eaceda 100644 --- a/sukuinote/plugins/ud.py +++ b/sukuinote/plugins/ud.py @@ -3,7 +3,7 @@ from pyrogram.errors.exceptions.forbidden_403 import Forbidden from pyrogram.errors.exceptions.bad_request_400 import ChatSendInlineForbidden from .. import slave, config, help_dict, log_errors, public_log_errors -@Client.on_message(~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.me & filters.command(['ud', 'urbandictionary'], prefixes=config['config']['prefixes'])) +@Client.on_message(~filters.scheduled & ~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.me & filters.command(['ud', 'urbandictionary'], prefixes=config['config']['prefixes'])) @log_errors @public_log_errors async def ud(client, message): diff --git a/sukuinote/plugins/whatanime.py b/sukuinote/plugins/whatanime.py index a80132b..dbf55ad 100644 --- a/sukuinote/plugins/whatanime.py +++ b/sukuinote/plugins/whatanime.py @@ -10,7 +10,7 @@ from pyrogram import Client, filters from pyrogram.types import Sticker from .. import config, help_dict, log_errors, session, progress_callback, public_log_errors -@Client.on_message(~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.me & filters.command(['trace', 'tracemoe', 'whatanime', 'wa', 'wait'], prefixes=config['config']['prefixes'])) +@Client.on_message(~filters.scheduled & ~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.me & filters.command(['trace', 'tracemoe', 'whatanime', 'wa', 'wait'], prefixes=config['config']['prefixes'])) @log_errors @public_log_errors async def whatanime(client, message): diff --git a/sukuinote/plugins/wikipedia.py b/sukuinote/plugins/wikipedia.py index 4bfa5e0..19ea30f 100644 --- a/sukuinote/plugins/wikipedia.py +++ b/sukuinote/plugins/wikipedia.py @@ -3,7 +3,7 @@ from pyrogram.errors.exceptions.forbidden_403 import Forbidden from pyrogram.errors.exceptions.bad_request_400 import ChatSendInlineForbidden from .. import slave, config, help_dict, log_errors, public_log_errors -@Client.on_message(~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.me & filters.command(['w', 'wiki', 'wikipedia'], prefixes=config['config']['prefixes'])) +@Client.on_message(~filters.scheduled & ~filters.forwarded & ~filters.sticker & ~filters.via_bot & ~filters.edited & filters.me & filters.command(['w', 'wiki', 'wikipedia'], prefixes=config['config']['prefixes'])) @log_errors @public_log_errors async def wikipedia(client, message):