Spaces:
Sleeping
Sleeping
iamgojoof6eyes
commited on
Commit
·
3925c05
1
Parent(s):
c6d67c2
looks good
Browse files- Powers/plugins/bans.py +3 -3
- Powers/plugins/fun.py +3 -3
- Powers/plugins/info.py +16 -8
- README.md +1 -1
Powers/plugins/bans.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
from traceback import format_exc
|
2 |
-
import
|
3 |
|
4 |
from pyrogram.errors import (
|
5 |
ChatAdminRequired,
|
@@ -27,8 +27,8 @@ from Powers.utils.string import extract_time
|
|
27 |
from Powers.vars import Config
|
28 |
|
29 |
|
30 |
-
BAN_MEDIA =
|
31 |
-
KICK_MEDIA =
|
32 |
|
33 |
@Gojo.on_message(command("tban") & restrict_filter)
|
34 |
async def tban_usr(c: Gojo, m: Message):
|
|
|
1 |
from traceback import format_exc
|
2 |
+
from random import choice
|
3 |
|
4 |
from pyrogram.errors import (
|
5 |
ChatAdminRequired,
|
|
|
27 |
from Powers.vars import Config
|
28 |
|
29 |
|
30 |
+
BAN_MEDIA = choice(BAN_GIFS)
|
31 |
+
KICK_MEDIA = choice(KICK_GIFS)
|
32 |
|
33 |
@Gojo.on_message(command("tban") & restrict_filter)
|
34 |
async def tban_usr(c: Gojo, m: Message):
|
Powers/plugins/fun.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
from html import escape
|
2 |
-
from
|
3 |
-
|
4 |
|
5 |
from pyrogram.errors import MessageTooLong
|
6 |
from pyrogram.types import Message
|
@@ -105,7 +105,7 @@ async def insult(c : Gojo , m: Message):
|
|
105 |
await m.reply_text("Sorry! I can't insult my devs....")
|
106 |
return LOGGER.info(f"{m.from_user.id} tried to insult {user_first_name} in {m.chat.id}")
|
107 |
else:
|
108 |
-
Insult_omp =
|
109 |
reply_text = m.reply_to_message.reply_text if m.reply_to_message else m.reply_text
|
110 |
await reply_text(Insult_omp)
|
111 |
LOGGER.info(f"{m.from_user.id} insulted {user_first_name} in {m.chat.id}")
|
|
|
1 |
from html import escape
|
2 |
+
from random import choice
|
3 |
+
|
4 |
|
5 |
from pyrogram.errors import MessageTooLong
|
6 |
from pyrogram.types import Message
|
|
|
105 |
await m.reply_text("Sorry! I can't insult my devs....")
|
106 |
return LOGGER.info(f"{m.from_user.id} tried to insult {user_first_name} in {m.chat.id}")
|
107 |
else:
|
108 |
+
Insult_omp = choice(fun_strings.INSULT_STRINGS)
|
109 |
reply_text = m.reply_to_message.reply_text if m.reply_to_message else m.reply_text
|
110 |
await reply_text(Insult_omp)
|
111 |
LOGGER.info(f"{m.from_user.id} insulted {user_first_name} in {m.chat.id}")
|
Powers/plugins/info.py
CHANGED
@@ -7,6 +7,7 @@ from pyrogram.types import Message
|
|
7 |
from Powers import DEV_USERS, SUDO_USERS, WHITELIST_USERS, SUPPORT_STAFF, LOGGER
|
8 |
from Powers.bot_class import Gojo
|
9 |
from Powers.utils.custom_filters import command
|
|
|
10 |
|
11 |
|
12 |
escape = "\n"
|
@@ -132,14 +133,21 @@ async def chat_info(chat, already=False):
|
|
132 |
|
133 |
|
134 |
@Gojo.on_message(command("info"))
|
135 |
-
async def info_func(
|
136 |
-
if message.reply_to_message:
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
user = message.text.split(None, 1)[1]
|
142 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
143 |
m = await message.reply_text(f"Fetching user info of user {user}...")
|
144 |
|
145 |
try:
|
@@ -166,7 +174,7 @@ async def chat_info_func(_, message: Message):
|
|
166 |
try:
|
167 |
if len(message.command) > 2:
|
168 |
return await message.reply_text(
|
169 |
-
"**Usage:**/
|
170 |
)
|
171 |
|
172 |
if len(message.command) == 1:
|
|
|
7 |
from Powers import DEV_USERS, SUDO_USERS, WHITELIST_USERS, SUPPORT_STAFF, LOGGER
|
8 |
from Powers.bot_class import Gojo
|
9 |
from Powers.utils.custom_filters import command
|
10 |
+
from Powers.utils.extract_user import extract_user
|
11 |
|
12 |
|
13 |
escape = "\n"
|
|
|
133 |
|
134 |
|
135 |
@Gojo.on_message(command("info"))
|
136 |
+
async def info_func(c: Gojo, message: Message):
|
137 |
+
if len(message.text.split()) == 1 and not message.reply_to_message:
|
138 |
+
await message.reply_text(text="I can't info fecth of nothing!")
|
139 |
+
await message.stop_propagation()
|
140 |
+
elif len(message.text.split()) > 2 and not message.reply_to_message:
|
141 |
+
await message.reply_text("You are not providing proper arguments.......do /help info to know how to use this command")
|
|
|
142 |
|
143 |
+
try:
|
144 |
+
user, _ , _= extract_user(c , message)
|
145 |
+
except Exception:
|
146 |
+
return
|
147 |
+
|
148 |
+
if not user:
|
149 |
+
message.reply_text("Can't find user to fetch info!")
|
150 |
+
|
151 |
m = await message.reply_text(f"Fetching user info of user {user}...")
|
152 |
|
153 |
try:
|
|
|
174 |
try:
|
175 |
if len(message.command) > 2:
|
176 |
return await message.reply_text(
|
177 |
+
"**Usage:**/chinfo [USERNAME|ID]"
|
178 |
)
|
179 |
|
180 |
if len(message.command) == 1:
|
README.md
CHANGED
@@ -27,7 +27,7 @@
|
|
27 |
If you like the bot make sure to give a ⭐ __star__ ⭐ to this respository and feel free to updating and sending pull requests**
|
28 |
|
29 |
---------
|
30 |
-
|
31 |
## Inspiration ✨
|
32 |
`Not a particular inspiration, inspired by many bots`
|
33 |
|
|
|
27 |
If you like the bot make sure to give a ⭐ __star__ ⭐ to this respository and feel free to updating and sending pull requests**
|
28 |
|
29 |
---------
|
30 |
+
|
31 |
## Inspiration ✨
|
32 |
`Not a particular inspiration, inspired by many bots`
|
33 |
|