chore(userbot): apply ruff check --fix and ruff format
- ruff check --fix: 210 auto-fixed errors (import sorting, trailing whitespace, unused imports, f-string fixups, deprecated annotations) - ruff format: 104 files reformatted to consistent style - 268 non-auto-fixable issues remain (S113 requests timeout, etc.)
This commit is contained in:
+6
-6
@@ -15,20 +15,20 @@
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
import asyncio
|
||||
|
||||
from pyrogram import Client, filters
|
||||
from pyrogram.types import Message
|
||||
|
||||
from utils.misc import modules_help, prefix
|
||||
from utils.scripts import with_reply
|
||||
|
||||
|
||||
@Client.on_message(filters.command("del", prefix) & filters.me)
|
||||
@Client.on_message(filters.command('del', prefix) & filters.me)
|
||||
async def del_msg(_, message: Message):
|
||||
await message.delete()
|
||||
await message.reply_to_message.delete()
|
||||
|
||||
|
||||
@Client.on_message(filters.command("purge", prefix) & filters.me)
|
||||
@Client.on_message(filters.command('purge', prefix) & filters.me)
|
||||
@with_reply
|
||||
async def purge(client: Client, message: Message):
|
||||
chunk = []
|
||||
@@ -48,7 +48,7 @@ async def purge(client: Client, message: Message):
|
||||
await client.delete_messages(message.chat.id, chunk)
|
||||
|
||||
|
||||
modules_help["purge"] = {
|
||||
"purge [reply]": "Purge (delete all messages) chat from replied message to last",
|
||||
"del [reply]": "Delete replied message",
|
||||
modules_help['purge'] = {
|
||||
'purge [reply]': 'Purge (delete all messages) chat from replied message to last',
|
||||
'del [reply]': 'Delete replied message',
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user