File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change 22from rubpy .types import Updates
33
44class 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 :
You can’t perform that action at this time.
0 commit comments