Spaces:
Sleeping
Sleeping
Captain Ezio
commited on
Commit
·
2aca525
1
Parent(s):
5ec9c41
Looks good
Browse files- Powers/plugins/bans.py +5 -2
- Powers/plugins/filters.py +1 -1
- Powers/plugins/formatting.py +1 -1
- Powers/plugins/fun.py +1 -1
- Powers/plugins/greetings.py +7 -3
- Powers/plugins/notes.py +4 -2
- Powers/plugins/start.py +1 -2
- Powers/plugins/stats.py +1 -1
- Powers/plugins/utils.py +1 -1
Powers/plugins/bans.py
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
from random import choice
|
|
|
2 |
from Powers.vars import Config
|
3 |
from traceback import format_exc
|
4 |
from Powers.bot_class import Gojo
|
5 |
from pyrogram.filters import regex
|
6 |
-
from pyrogram import enums
|
7 |
from Powers.utils.parser import mention_html
|
8 |
from Powers.utils.string import extract_time
|
9 |
from Powers.utils.extract_user import extract_user
|
@@ -540,7 +540,10 @@ async def dkick_usr(c: Gojo, m: Message):
|
|
540 |
txt += f"\n<b>Reason</b>: {reason}" if reason else ""
|
541 |
await c.send_message(m.chat.id, txt)
|
542 |
await c.send_animation(
|
543 |
-
chat_id=m.chat.id,
|
|
|
|
|
|
|
544 |
)
|
545 |
await m.chat.unban_member(user_id)
|
546 |
except ChatAdminRequired:
|
|
|
1 |
from random import choice
|
2 |
+
from pyrogram import enums
|
3 |
from Powers.vars import Config
|
4 |
from traceback import format_exc
|
5 |
from Powers.bot_class import Gojo
|
6 |
from pyrogram.filters import regex
|
|
|
7 |
from Powers.utils.parser import mention_html
|
8 |
from Powers.utils.string import extract_time
|
9 |
from Powers.utils.extract_user import extract_user
|
|
|
540 |
txt += f"\n<b>Reason</b>: {reason}" if reason else ""
|
541 |
await c.send_message(m.chat.id, txt)
|
542 |
await c.send_animation(
|
543 |
+
chat_id=m.chat.id,
|
544 |
+
animation=KICK_MEDIA,
|
545 |
+
caption=txt,
|
546 |
+
parse_mode=enums.ParseMode.HTML,
|
547 |
)
|
548 |
await m.chat.unban_member(user_id)
|
549 |
except ChatAdminRequired:
|
Powers/plugins/filters.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
from secrets import choice
|
2 |
-
from pyrogram import filters, enums
|
3 |
from traceback import format_exc
|
4 |
from re import escape as re_escape
|
|
|
5 |
from pyrogram.errors import RPCError
|
6 |
from Powers.utils.kbhelpers import ikb
|
7 |
from Powers.bot_class import LOGGER, Gojo
|
|
|
1 |
from secrets import choice
|
|
|
2 |
from traceback import format_exc
|
3 |
from re import escape as re_escape
|
4 |
+
from pyrogram import enums, filters
|
5 |
from pyrogram.errors import RPCError
|
6 |
from Powers.utils.kbhelpers import ikb
|
7 |
from Powers.bot_class import LOGGER, Gojo
|
Powers/plugins/formatting.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
from Powers import LOGGER
|
2 |
-
from pyrogram import filters, enums
|
3 |
from Powers.bot_class import Gojo
|
|
|
4 |
from Powers.utils.kbhelpers import ikb
|
5 |
from Powers.utils.custom_filters import command
|
6 |
from pyrogram.types import Message, CallbackQuery
|
|
|
1 |
from Powers import LOGGER
|
|
|
2 |
from Powers.bot_class import Gojo
|
3 |
+
from pyrogram import enums, filters
|
4 |
from Powers.utils.kbhelpers import ikb
|
5 |
from Powers.utils.custom_filters import command
|
6 |
from pyrogram.types import Message, CallbackQuery
|
Powers/plugins/fun.py
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
from html import escape
|
2 |
from random import choice
|
|
|
3 |
from Powers.utils import extras
|
4 |
from Powers.bot_class import Gojo
|
5 |
from pyrogram.types import Message
|
6 |
-
from pyrogram import enums
|
7 |
from Powers import LOGGER, DEV_USERS
|
8 |
from pyrogram.errors import MessageTooLong
|
9 |
from Powers.utils.custom_filters import command
|
|
|
1 |
from html import escape
|
2 |
from random import choice
|
3 |
+
from pyrogram import enums
|
4 |
from Powers.utils import extras
|
5 |
from Powers.bot_class import Gojo
|
6 |
from pyrogram.types import Message
|
|
|
7 |
from Powers import LOGGER, DEV_USERS
|
8 |
from pyrogram.errors import MessageTooLong
|
9 |
from Powers.utils.custom_filters import command
|
Powers/plugins/greetings.py
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
from html import escape
|
2 |
from secrets import choice
|
3 |
from Powers import DEV_USERS
|
4 |
-
from pyrogram import filters, enums
|
5 |
from Powers.vars import Config
|
6 |
from Powers.bot_class import Gojo
|
|
|
7 |
from Powers.utils.chat_type import chattype
|
8 |
from Powers.database.antispam_db import GBan
|
9 |
from Powers.database.greetings_db import Greetings
|
@@ -403,7 +403,9 @@ async def welcome(c: Gojo, m: Message):
|
|
403 |
Welcome text in no formating:
|
404 |
""",
|
405 |
)
|
406 |
-
await c.send_message(
|
|
|
|
|
407 |
return
|
408 |
if args[1].lower() == "on":
|
409 |
db.set_current_welcome_settings(True)
|
@@ -448,7 +450,9 @@ async def goodbye(c: Gojo, m: Message):
|
|
448 |
Goodbye text in no formating:
|
449 |
""",
|
450 |
)
|
451 |
-
await c.send_message(
|
|
|
|
|
452 |
return
|
453 |
if args[1].lower() == "on":
|
454 |
db.set_current_goodbye_settings(True)
|
|
|
1 |
from html import escape
|
2 |
from secrets import choice
|
3 |
from Powers import DEV_USERS
|
|
|
4 |
from Powers.vars import Config
|
5 |
from Powers.bot_class import Gojo
|
6 |
+
from pyrogram import enums, filters
|
7 |
from Powers.utils.chat_type import chattype
|
8 |
from Powers.database.antispam_db import GBan
|
9 |
from Powers.database.greetings_db import Greetings
|
|
|
403 |
Welcome text in no formating:
|
404 |
""",
|
405 |
)
|
406 |
+
await c.send_message(
|
407 |
+
m.chat.id, text=oo, parse_mode=enums.ParseMode.DISABLED
|
408 |
+
)
|
409 |
return
|
410 |
if args[1].lower() == "on":
|
411 |
db.set_current_welcome_settings(True)
|
|
|
450 |
Goodbye text in no formating:
|
451 |
""",
|
452 |
)
|
453 |
+
await c.send_message(
|
454 |
+
m.chat.id, text=oo, parse_mode=enums.ParseMode.DISABLED
|
455 |
+
)
|
456 |
return
|
457 |
if args[1].lower() == "on":
|
458 |
db.set_current_goodbye_settings(True)
|
Powers/plugins/notes.py
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
from Powers import LOGGER
|
2 |
from secrets import choice
|
3 |
-
from pyrogram import filters, enums
|
4 |
from Powers.vars import Config
|
5 |
from traceback import format_exc
|
6 |
from Powers.bot_class import Gojo
|
|
|
7 |
from pyrogram.errors import RPCError
|
8 |
from Powers.utils.kbhelpers import ikb
|
9 |
from Powers.utils.cmd_senders import send_cmd
|
@@ -219,7 +219,9 @@ async def get_raw_note(c: Gojo, m: Message, note: str):
|
|
219 |
|
220 |
if msgtype == Types.TEXT:
|
221 |
teks = getnotes["note_value"]
|
222 |
-
await m.reply_text(
|
|
|
|
|
223 |
elif msgtype in (
|
224 |
Types.STICKER,
|
225 |
Types.VIDEO_NOTE,
|
|
|
1 |
from Powers import LOGGER
|
2 |
from secrets import choice
|
|
|
3 |
from Powers.vars import Config
|
4 |
from traceback import format_exc
|
5 |
from Powers.bot_class import Gojo
|
6 |
+
from pyrogram import enums, filters
|
7 |
from pyrogram.errors import RPCError
|
8 |
from Powers.utils.kbhelpers import ikb
|
9 |
from Powers.utils.cmd_senders import send_cmd
|
|
|
219 |
|
220 |
if msgtype == Types.TEXT:
|
221 |
teks = getnotes["note_value"]
|
222 |
+
await m.reply_text(
|
223 |
+
teks, parse_mode=enums.ParseMode.DISABLED, reply_to_message_id=msg_id
|
224 |
+
)
|
225 |
elif msgtype in (
|
226 |
Types.STICKER,
|
227 |
Types.VIDEO_NOTE,
|
Powers/plugins/start.py
CHANGED
@@ -1,14 +1,13 @@
|
|
1 |
from random import choice
|
2 |
-
from pyrogram import filters
|
3 |
from Powers.vars import Config
|
4 |
from Powers.bot_class import Gojo
|
|
|
5 |
from Powers.utils.kbhelpers import ikb
|
6 |
from Powers import LOGGER, HELP_COMMANDS
|
7 |
from Powers.utils.extras import StartPic
|
8 |
from Powers.utils.chat_type import chattype
|
9 |
from Powers.utils.custom_filters import command
|
10 |
from pyrogram.types import Message, CallbackQuery
|
11 |
-
from pyrogram import enums
|
12 |
from pyrogram.errors import UserIsBlocked, QueryIdInvalid, MessageNotModified
|
13 |
from Powers.utils.start_utils import (
|
14 |
gen_cmds_kb, gen_start_kb, get_help_msg, get_private_note,
|
|
|
1 |
from random import choice
|
|
|
2 |
from Powers.vars import Config
|
3 |
from Powers.bot_class import Gojo
|
4 |
+
from pyrogram import enums, filters
|
5 |
from Powers.utils.kbhelpers import ikb
|
6 |
from Powers import LOGGER, HELP_COMMANDS
|
7 |
from Powers.utils.extras import StartPic
|
8 |
from Powers.utils.chat_type import chattype
|
9 |
from Powers.utils.custom_filters import command
|
10 |
from pyrogram.types import Message, CallbackQuery
|
|
|
11 |
from pyrogram.errors import UserIsBlocked, QueryIdInvalid, MessageNotModified
|
12 |
from Powers.utils.start_utils import (
|
13 |
gen_cmds_kb, gen_start_kb, get_help_msg, get_private_note,
|
Powers/plugins/stats.py
CHANGED
@@ -1,6 +1,6 @@
|
|
|
|
1 |
from Powers.bot_class import Gojo
|
2 |
from pyrogram.types import Message
|
3 |
-
from pyrogram import enums
|
4 |
from Powers.database.pins_db import Pins
|
5 |
from Powers.database.chats_db import Chats
|
6 |
from Powers.database.rules_db import Rules
|
|
|
1 |
+
from pyrogram import enums
|
2 |
from Powers.bot_class import Gojo
|
3 |
from pyrogram.types import Message
|
|
|
4 |
from Powers.database.pins_db import Pins
|
5 |
from Powers.database.chats_db import Chats
|
6 |
from Powers.database.rules_db import Rules
|
Powers/plugins/utils.py
CHANGED
@@ -4,12 +4,12 @@ from Powers import *
|
|
4 |
from os import remove
|
5 |
from io import BytesIO
|
6 |
from tswift import Song
|
7 |
-
from pyrogram import filters, enums
|
8 |
from wikipedia import summary
|
9 |
from traceback import format_exc
|
10 |
from Powers.bot_class import Gojo
|
11 |
from aiohttp import ClientSession
|
12 |
from gpytranslate import Translator
|
|
|
13 |
from Powers.utils.http_helper import *
|
14 |
from Powers.database.users_db import Users
|
15 |
from Powers.utils.chat_type import chattype
|
|
|
4 |
from os import remove
|
5 |
from io import BytesIO
|
6 |
from tswift import Song
|
|
|
7 |
from wikipedia import summary
|
8 |
from traceback import format_exc
|
9 |
from Powers.bot_class import Gojo
|
10 |
from aiohttp import ClientSession
|
11 |
from gpytranslate import Translator
|
12 |
+
from pyrogram import enums, filters
|
13 |
from Powers.utils.http_helper import *
|
14 |
from Powers.database.users_db import Users
|
15 |
from Powers.utils.chat_type import chattype
|