Don't handle scheduled messages
This commit is contained in:
parent
c933266bbe
commit
4d2b2c65eb
|
@ -30,7 +30,7 @@ def _generate_sexy(entity, ping, is_creator):
|
||||||
sexy_text += ' <code>[CREATOR]</code>'
|
sexy_text += ' <code>[CREATOR]</code>'
|
||||||
return sexy_text
|
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
|
@log_errors
|
||||||
@public_log_errors
|
@public_log_errors
|
||||||
async def admins(client, message):
|
async def admins(client, message):
|
||||||
|
|
|
@ -5,7 +5,7 @@ from pyrogram.errors.exceptions.forbidden_403 import Forbidden
|
||||||
from pyrogram.errors.exceptions.bad_request_400 import ChatSendInlineForbidden
|
from pyrogram.errors.exceptions.bad_request_400 import ChatSendInlineForbidden
|
||||||
from .. import slave, config, help_dict, log_errors, public_log_errors
|
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
|
@log_errors
|
||||||
@public_log_errors
|
@public_log_errors
|
||||||
async def anilist(client, message):
|
async def anilist(client, message):
|
||||||
|
|
|
@ -4,7 +4,7 @@ import tempfile
|
||||||
from pyrogram import Client, filters
|
from pyrogram import Client, filters
|
||||||
from .. import config, help_dict, log_errors, session, progress_callback, public_log_errors
|
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
|
@log_errors
|
||||||
@public_log_errors
|
@public_log_errors
|
||||||
async def cat(client, message):
|
async def cat(client, message):
|
||||||
|
|
|
@ -3,7 +3,7 @@ import asyncio
|
||||||
from pyrogram import Client, filters
|
from pyrogram import Client, filters
|
||||||
from .. import config, help_dict, log_errors, public_log_errors
|
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
|
@log_errors
|
||||||
@public_log_errors
|
@public_log_errors
|
||||||
async def delete(client, message):
|
async def delete(client, message):
|
||||||
|
@ -18,7 +18,7 @@ async def delete(client, message):
|
||||||
break
|
break
|
||||||
await client.delete_messages(message.chat.id, messages)
|
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
|
@log_errors
|
||||||
@public_log_errors
|
@public_log_errors
|
||||||
async def deleteall(client, message):
|
async def deleteall(client, message):
|
||||||
|
@ -28,7 +28,7 @@ async def deleteall(client, message):
|
||||||
return
|
return
|
||||||
await client.delete_user_history(message.chat.id, reply.from_user.id)
|
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
|
@log_errors
|
||||||
@public_log_errors
|
@public_log_errors
|
||||||
async def purge(client, message):
|
async def purge(client, message):
|
||||||
|
@ -61,7 +61,7 @@ async def purge(client, message):
|
||||||
|
|
||||||
yeetpurge_info = {True: dict(), False: dict()}
|
yeetpurge_info = {True: dict(), False: dict()}
|
||||||
yeetpurge_lock = asyncio.Lock()
|
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
|
@log_errors
|
||||||
@public_log_errors
|
@public_log_errors
|
||||||
async def yeetpurge(client, message):
|
async def yeetpurge(client, message):
|
||||||
|
|
|
@ -50,7 +50,7 @@ DEAI_MODULE_CODES = {
|
||||||
"8": "Codename Gestapo"
|
"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
|
@log_errors
|
||||||
@public_log_errors
|
@public_log_errors
|
||||||
async def fedstat(client, message):
|
async def fedstat(client, message):
|
||||||
|
@ -200,7 +200,7 @@ async def get_spam_protection(entity):
|
||||||
return text
|
return text
|
||||||
return f'- <b>{json["response_code"]}</b>: {json["error"]["error_code"]}: {json["error"]["type"]}: {html.escape(json["error"]["message"])}'
|
return f'- <b>{json["response_code"]}</b>: {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):
|
async def fedstat_conversation_hack(client, message):
|
||||||
reply = message.reply_to_message
|
reply = message.reply_to_message
|
||||||
if not getattr(reply, 'empty', True):
|
if not getattr(reply, 'empty', True):
|
||||||
|
|
|
@ -4,7 +4,7 @@ from pyrogram import Client, filters
|
||||||
from pyrogram.errors.exceptions.bad_request_400 import MessageIdInvalid
|
from pyrogram.errors.exceptions.bad_request_400 import MessageIdInvalid
|
||||||
from .. import config, help_dict, log_errors, session, progress_callback, public_log_errors
|
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
|
@log_errors
|
||||||
@public_log_errors
|
@public_log_errors
|
||||||
async def ls(client, message):
|
async def ls(client, message):
|
||||||
|
@ -28,7 +28,7 @@ async def ls(client, message):
|
||||||
text += f'<code>{html.escape(i)}</code>\n'
|
text += f'<code>{html.escape(i)}</code>\n'
|
||||||
await message.reply_text(text or 'Empty', disable_web_page_preview=True)
|
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
|
@log_errors
|
||||||
@public_log_errors
|
@public_log_errors
|
||||||
async def upload(client, message):
|
async def upload(client, message):
|
||||||
|
@ -44,7 +44,7 @@ async def upload(client, message):
|
||||||
else:
|
else:
|
||||||
await reply.delete()
|
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
|
@log_errors
|
||||||
@public_log_errors
|
@public_log_errors
|
||||||
async def download(client, message):
|
async def download(client, message):
|
||||||
|
|
|
@ -4,7 +4,7 @@ from pyrogram.errors.exceptions.forbidden_403 import Forbidden
|
||||||
from pyrogram.errors.exceptions.bad_request_400 import ChatSendInlineForbidden
|
from pyrogram.errors.exceptions.bad_request_400 import ChatSendInlineForbidden
|
||||||
from .. import slave, config, help_dict, log_errors, public_log_errors
|
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
|
@log_errors
|
||||||
@public_log_errors
|
@public_log_errors
|
||||||
async def help(client, message):
|
async def help(client, message):
|
||||||
|
|
|
@ -29,7 +29,7 @@ def _generate_sexy(entity, ping):
|
||||||
sexy_text += ' <code>[FAKE]</code>'
|
sexy_text += ' <code>[FAKE]</code>'
|
||||||
return sexy_text
|
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
|
@log_errors
|
||||||
@public_log_errors
|
@public_log_errors
|
||||||
async def info(client, message):
|
async def info(client, message):
|
||||||
|
@ -77,7 +77,7 @@ async def info(client, message):
|
||||||
except MessageNotModified:
|
except MessageNotModified:
|
||||||
pass
|
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
|
@log_errors
|
||||||
@public_log_errors
|
@public_log_errors
|
||||||
async def id(client, message):
|
async def id(client, message):
|
||||||
|
|
|
@ -8,7 +8,7 @@ logged = defaultdict(set)
|
||||||
lock = asyncio.Lock()
|
lock = asyncio.Lock()
|
||||||
force_ltr = '\u200E'
|
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
|
@log_errors
|
||||||
async def log_forwards(client, message):
|
async def log_forwards(client, message):
|
||||||
if not config['config'].get('log_forwards'):
|
if not config['config'].get('log_forwards'):
|
||||||
|
|
|
@ -8,7 +8,7 @@ reported = defaultdict(set)
|
||||||
lock = asyncio.Lock()
|
lock = asyncio.Lock()
|
||||||
force_ltr = '\u200E'
|
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
|
@log_errors
|
||||||
async def log_reports(client, message):
|
async def log_reports(client, message):
|
||||||
if not config['config']['log_reports']:
|
if not config['config']['log_reports']:
|
||||||
|
|
|
@ -3,7 +3,7 @@ from pyrogram.types.messages_and_media import Photo
|
||||||
from pyrogram.errors.exceptions.forbidden_403 import Forbidden
|
from pyrogram.errors.exceptions.forbidden_403 import Forbidden
|
||||||
from .. import slave, config, help_dict, log_errors, public_log_errors
|
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
|
@log_errors
|
||||||
@public_log_errors
|
@public_log_errors
|
||||||
async def loli(client, message):
|
async def loli(client, message):
|
||||||
|
|
|
@ -10,7 +10,7 @@ from .. import config, help_dict, log_errors, session, slave, public_log_errors
|
||||||
help_text = ''
|
help_text = ''
|
||||||
|
|
||||||
def _generate(i):
|
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
|
@log_errors
|
||||||
@public_log_errors
|
@public_log_errors
|
||||||
async def func(client, message):
|
async def func(client, message):
|
||||||
|
|
|
@ -7,7 +7,7 @@ strings = {
|
||||||
'pong': 'Ping!'
|
'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
|
@log_errors
|
||||||
@public_log_errors
|
@public_log_errors
|
||||||
async def ping_pong(client, message):
|
async def ping_pong(client, message):
|
||||||
|
|
|
@ -3,7 +3,7 @@ import signal
|
||||||
from pyrogram import Client, filters
|
from pyrogram import Client, filters
|
||||||
from .. import config, help_dict, log_errors, public_log_errors
|
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
|
@log_errors
|
||||||
@public_log_errors
|
@public_log_errors
|
||||||
async def poweroff(client, message):
|
async def poweroff(client, message):
|
||||||
|
|
|
@ -12,7 +12,7 @@ from .. import config, help_dict, log_errors, slave, apps, session, public_log_e
|
||||||
exec_tasks = dict()
|
exec_tasks = dict()
|
||||||
|
|
||||||
PYEXEC_REGEX = '^(?:' + '|'.join(map(re.escape, config['config']['prefixes'])) + r')exec\s+([\s\S]+)$'
|
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
|
@log_errors
|
||||||
@public_log_errors
|
@public_log_errors
|
||||||
async def pyexec(client, message):
|
async def pyexec(client, message):
|
||||||
|
@ -91,7 +91,7 @@ async def pyexec(client, message):
|
||||||
else:
|
else:
|
||||||
await reply.edit_text(output)
|
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
|
@log_errors
|
||||||
@public_log_errors
|
@public_log_errors
|
||||||
async def listexec(client, message):
|
async def listexec(client, message):
|
||||||
|
@ -104,7 +104,7 @@ async def listexec(client, message):
|
||||||
text = '\n'.join(map(lambda i: f'<code>{i}</code>', exec_tasks))
|
text = '\n'.join(map(lambda i: f'<code>{i}</code>', exec_tasks))
|
||||||
await message.reply_text(text or 'No 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
|
@log_errors
|
||||||
@public_log_errors
|
@public_log_errors
|
||||||
async def cancelexec(client, message):
|
async def cancelexec(client, message):
|
||||||
|
|
|
@ -23,7 +23,7 @@ async def download_file(url, filename, referer=None):
|
||||||
return True
|
return True
|
||||||
file.write(chunk)
|
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
|
@log_errors
|
||||||
@public_log_errors
|
@public_log_errors
|
||||||
async def saucenao(client, message):
|
async def saucenao(client, message):
|
||||||
|
|
|
@ -6,7 +6,7 @@ from pyrogram import Client, filters
|
||||||
from .. import config, help_dict, log_errors, public_log_errors
|
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]+))?$'
|
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
|
@log_errors
|
||||||
@public_log_errors
|
@public_log_errors
|
||||||
async def shell(client, message):
|
async def shell(client, message):
|
||||||
|
|
|
@ -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)
|
PROBLEM_CODES = set(i for i in googletrans.LANGUAGES if '-' in i)
|
||||||
ZWS = '\u200B'
|
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
|
@log_errors
|
||||||
@public_log_errors
|
@public_log_errors
|
||||||
async def translate(client, message):
|
async def translate(client, message):
|
||||||
|
|
|
@ -3,7 +3,7 @@ from pyrogram.errors.exceptions.forbidden_403 import Forbidden
|
||||||
from pyrogram.errors.exceptions.bad_request_400 import ChatSendInlineForbidden
|
from pyrogram.errors.exceptions.bad_request_400 import ChatSendInlineForbidden
|
||||||
from .. import slave, config, help_dict, log_errors, public_log_errors
|
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
|
@log_errors
|
||||||
@public_log_errors
|
@public_log_errors
|
||||||
async def ud(client, message):
|
async def ud(client, message):
|
||||||
|
|
|
@ -10,7 +10,7 @@ from pyrogram import Client, filters
|
||||||
from pyrogram.types import Sticker
|
from pyrogram.types import Sticker
|
||||||
from .. import config, help_dict, log_errors, session, progress_callback, public_log_errors
|
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
|
@log_errors
|
||||||
@public_log_errors
|
@public_log_errors
|
||||||
async def whatanime(client, message):
|
async def whatanime(client, message):
|
||||||
|
|
|
@ -3,7 +3,7 @@ from pyrogram.errors.exceptions.forbidden_403 import Forbidden
|
||||||
from pyrogram.errors.exceptions.bad_request_400 import ChatSendInlineForbidden
|
from pyrogram.errors.exceptions.bad_request_400 import ChatSendInlineForbidden
|
||||||
from .. import slave, config, help_dict, log_errors, public_log_errors
|
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
|
@log_errors
|
||||||
@public_log_errors
|
@public_log_errors
|
||||||
async def wikipedia(client, message):
|
async def wikipedia(client, message):
|
||||||
|
|
Loading…
Reference in New Issue