Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zeldrisdev #57

Merged
merged 4 commits into from
Jan 15, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
purge: fix admins checker
Signed-off-by: Ryomen-Sukuna <[email protected]>
  • Loading branch information
Ryomen-Sukuna authored Jan 15, 2022
commit 9a0de1ed16275e9158d09177e14c68afaa486ca2
4 changes: 2 additions & 2 deletions zeldris/modules/purge.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ async def purge(event):
chat = event.chat_id
msgs = []

if not await is_administrator(user_id=event.from_id, message=event):
if not await is_administrator(user_id=event.sender_id, message=event):
await event.reply("You're not an admin!")
return

Expand Down Expand Up @@ -81,7 +81,7 @@ async def purge(event):

@client.on(events.NewMessage(pattern="^/del$"))
async def delete_msg(event):
if not await is_administrator(user_id=event.from_id, message=event):
if not await is_administrator(user_id=event.sender_id, message=event):
await event.reply("You're not an admin!")
return

Expand Down