@@ -144,6 +144,7 @@ def admin_check(bot, update):
144144 if user .id in db .get_admins ():
145145 return func (bot , update )
146146 else :
147+ update .message .reply_text ('You have not the needed permissions to do that!' )
147148 logger .warning ("User {} ({}, @{}) tried to use admin function '{}'!" .format (user .id , user .first_name , user .username , func .__name__ ))
148149
149150 return admin_check
@@ -189,7 +190,7 @@ def start_cmd(bot, update):
189190 if game .players [0 ].user_id == user_id :
190191 game .start_game ()
191192 else :
192- bot . sendMessage ( chat_id , text = "Only the creator can start the game" )
193+ update . message . reply_text ( "Only the creator can start the game" )
193194
194195
195196def stop_cmd (bot , update ):
@@ -230,7 +231,7 @@ def help_cmd(bot, update):
230231 hide_description
231232 )
232233
233- bot . sendMessage ( chat_id = chat_id , text = text )
234+ update . message . reply_text ( text )
234235
235236
236237def join_cmd (bot , update ):
@@ -244,7 +245,7 @@ def join_cmd(bot, update):
244245
245246
246247def stats_cmd (bot , update ):
247- bot . sendMessage ( chat_id = update .message .chat_id , text = get_user_stats (update .message .from_user .id ))
248+ update .message .reply_text ( get_user_stats (update .message .from_user .id ))
248249
249250
250251def language_cmd (bot , update ):
0 commit comments