Spaces:
Paused
Paused
Captain Ezio
commited on
Commit
·
9b50f05
1
Parent(s):
de3ac37
Update fun.py
Browse files- Powers/plugins/fun.py +10 -11
Powers/plugins/fun.py
CHANGED
|
@@ -9,7 +9,6 @@ from Powers import DEV_USERS, LOGGER
|
|
| 9 |
from Powers.bot_class import Gojo
|
| 10 |
from Powers.utils import extras
|
| 11 |
from Powers.utils.custom_filters import command
|
| 12 |
-
from Powers.utils.extract_user import extract_user
|
| 13 |
from Powers.utils.extras import NOWYES as NO
|
| 14 |
from Powers.utils.extras import YESWNO as YES
|
| 15 |
|
|
@@ -53,11 +52,12 @@ async def fun_slap(c: Gojo, m: Message):
|
|
| 53 |
reply_text = m.reply_to_message.reply_text if m.reply_to_message else m.reply_text
|
| 54 |
|
| 55 |
curr_user = escape(m.from_user.first_name)
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
|
|
|
| 61 |
if user_id == me.id:
|
| 62 |
temp = choice(extras.SLAP_GOJO_TEMPLATES)
|
| 63 |
else:
|
|
@@ -65,7 +65,7 @@ async def fun_slap(c: Gojo, m: Message):
|
|
| 65 |
|
| 66 |
if user_id:
|
| 67 |
user1 = curr_user
|
| 68 |
-
user2 =
|
| 69 |
|
| 70 |
else:
|
| 71 |
user1 = me.first_name
|
|
@@ -99,10 +99,9 @@ async def fun_toss(_, m: Message):
|
|
| 99 |
|
| 100 |
@Gojo.on_message(command("insult"))
|
| 101 |
async def insult(c: Gojo, m: Message):
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
return
|
| 106 |
if user_id in DEV_USERS:
|
| 107 |
await m.reply_text("Sorry! I can't insult my devs....")
|
| 108 |
return LOGGER.info(
|
|
|
|
| 9 |
from Powers.bot_class import Gojo
|
| 10 |
from Powers.utils import extras
|
| 11 |
from Powers.utils.custom_filters import command
|
|
|
|
| 12 |
from Powers.utils.extras import NOWYES as NO
|
| 13 |
from Powers.utils.extras import YESWNO as YES
|
| 14 |
|
|
|
|
| 52 |
reply_text = m.reply_to_message.reply_text if m.reply_to_message else m.reply_text
|
| 53 |
|
| 54 |
curr_user = escape(m.from_user.first_name)
|
| 55 |
+
if m.reply_to_message:
|
| 56 |
+
user = m.reply_to_message.from_user
|
| 57 |
+
else:
|
| 58 |
+
user = m.from_user
|
| 59 |
+
user_id = user.id
|
| 60 |
+
|
| 61 |
if user_id == me.id:
|
| 62 |
temp = choice(extras.SLAP_GOJO_TEMPLATES)
|
| 63 |
else:
|
|
|
|
| 65 |
|
| 66 |
if user_id:
|
| 67 |
user1 = curr_user
|
| 68 |
+
user2 = user.first_name
|
| 69 |
|
| 70 |
else:
|
| 71 |
user1 = me.first_name
|
|
|
|
| 99 |
|
| 100 |
@Gojo.on_message(command("insult"))
|
| 101 |
async def insult(c: Gojo, m: Message):
|
| 102 |
+
if not m.reply_to_message:
|
| 103 |
+
return await m.reply_text("You want to insult yourself such a foolish person")
|
| 104 |
+
user_id = m.reply_to_message.from_user.id
|
|
|
|
| 105 |
if user_id in DEV_USERS:
|
| 106 |
await m.reply_text("Sorry! I can't insult my devs....")
|
| 107 |
return LOGGER.info(
|