Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* Fix for this https://t.me/usergeot/784099

* Update gban.py
  • Loading branch information
jigarvarma2k20 authored Jan 8, 2022
1 parent 29b8e5c commit f1c3007
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions userge/plugins/admin/gadmin.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ async def ban_user(message: Message):
await message.edit("`Trying to Ban User.. Hang on!! ⏳`")
_period, _time = _get_period_and_time(message.flags)
try:
await message.chat.kick_member(user_id, _period)
await message.chat.ban_member(user_id, _period)
except UsernameInvalid:
await message.err("invalid username, try again with valid info ⚠")
except PeerIdInvalid:
Expand Down Expand Up @@ -250,7 +250,7 @@ async def kick_usr(message: Message):

await message.edit("`Trying to Kick User.. Hang on!! ⏳`")
try:
await message.chat.kick_member(user_id, until_date=int(time.time() + 59))
await message.chat.ban_member(user_id, until_date=int(time.time() + 59))
except UsernameInvalid:
await message.err("invalid username, try again with valid info ⚠")
except PeerIdInvalid:
Expand Down Expand Up @@ -734,7 +734,7 @@ async def ban_spammers(message: Message):
if sender_chat_id not in ALLOWED.get(chat_id, [chat_id]):
await message.delete()
if chat_id in BAN_CHANNELS:
await message.chat.kick_member(sender_chat_id)
await message.chat.ban_member(sender_chat_id)
await message.reply(
"#BAN_CHANNEL\n\n"
"Message from channel detected and banned\n"
Expand Down
2 changes: 1 addition & 1 deletion userge/plugins/admin/gban.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ async def gban_user(message: Message):
gbanned_chats = []
for chat in chats:
try:
await chat.kick_member(user_id)
await chat.ban_member(user_id)
gbanned_chats.append(chat.id)
await CHANNEL.log(
r"\\**#Antispam_Log**//"
Expand Down

0 comments on commit f1c3007

Please sign in to comment.