Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit df4fe37

Browse files
Update GroupManagement.py
1 parent 22fba5a commit df4fe37

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

GroupManagement.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
from rubpy.types import Updates
33

44
class Bot(Client):
5-
def init(self, name):
6-
super().init(name)
5+
def __init__(self, name):
6+
super().__init__(name)
77
self.silent_users = []
88

99
async def handle_updates(self, update: Updates):
10-
if update.object_guid == 'your group guid' and update.message.author_object_guid == 'owner guid ':
10+
if update.object_guid == 'your gap guid' and update.message.author_object_guid == 'owner guid':
1111
if not update.message.reply_to_message_id:
1212
return
1313

@@ -31,8 +31,13 @@ async def handle_updates(self, update: Updates):
3131
await update.reply(f'کاربر {utils.Mention("کاربر", user_guid)} از گروه حذف شد')
3232

3333
elif update.message.text == 'لیست سکوت':
34-
for x in self.silent_users:
35-
await update.reply(utils.Mention("کاربر", x))
34+
if self.silent_users:
35+
mentions = ', '.join([utils.Mention("کاربر", x)
36+
for x in self.silent_users])
37+
await update.reply(mentions)
38+
else:
39+
await update.reply('لیست سکوت خالی است.')
40+
3641

3742
async def check_silent_users(self, update: Updates):
3843
if update.message.author_object_guid in self.silent_users:

0 commit comments

Comments
 (0)