Spaces:
Sleeping
Sleeping
Captain D. Ezio
commited on
Commit
·
994b964
1
Parent(s):
7dc6404
Update dev.py
Browse files- Powers/plugins/dev.py +8 -4
Powers/plugins/dev.py
CHANGED
@@ -179,18 +179,22 @@ async def rm_support(c: Gojo, m: Message):
|
|
179 |
except Exception:
|
180 |
await m.reply_text("Reply to an user")
|
181 |
return
|
182 |
-
support.delete_support_user(curr)
|
183 |
-
await m.reply_text("Done! User now no longer belongs to the support staff")
|
184 |
elif len(split) >= 2:
|
185 |
try:
|
186 |
-
|
187 |
except Exception:
|
188 |
await m.reply_text("Dunno who u r talking abt")
|
189 |
return
|
|
|
|
|
|
|
|
|
|
|
|
|
190 |
support.delete_support_user(user)
|
191 |
await m.reply_text("Done! User now no longer belongs to the support staff")
|
192 |
else:
|
193 |
-
await m.reply_text("
|
194 |
return
|
195 |
|
196 |
@Gojo.on_message(command("ping", sudo_cmd=True))
|
|
|
179 |
except Exception:
|
180 |
await m.reply_text("Reply to an user")
|
181 |
return
|
|
|
|
|
182 |
elif len(split) >= 2:
|
183 |
try:
|
184 |
+
curr,_,_ = extract_user(m)
|
185 |
except Exception:
|
186 |
await m.reply_text("Dunno who u r talking abt")
|
187 |
return
|
188 |
+
else:
|
189 |
+
await m.reply_text("**USAGE**\n/rmsupport [reply to user | user id | username]")
|
190 |
+
return
|
191 |
+
to_user = support.get_support_type(curr)
|
192 |
+
can_user = can_change_type(curr_user,to_user)
|
193 |
+
if m.from_user.id == int(OWNER_ID) or can_user:
|
194 |
support.delete_support_user(user)
|
195 |
await m.reply_text("Done! User now no longer belongs to the support staff")
|
196 |
else:
|
197 |
+
await m.reply_text("Sorry you can't do that...")
|
198 |
return
|
199 |
|
200 |
@Gojo.on_message(command("ping", sudo_cmd=True))
|