commit
1cc4e9ee2d
4
bot.py
4
bot.py
@ -64,6 +64,8 @@ class Core(TasksHandlerMixin):
|
|||||||
self.send_message('🤖 Поиски собеседника продолжаются')
|
self.send_message('🤖 Поиски собеседника продолжаются')
|
||||||
|
|
||||||
def send_message(self, text, chat_id=None, reply_markup=None, remove_keyboard=True, method='send_message', **kwargs):
|
def send_message(self, text, chat_id=None, reply_markup=None, remove_keyboard=True, method='send_message', **kwargs):
|
||||||
|
if text is None and not kwargs:
|
||||||
|
return
|
||||||
if reply_markup is None and remove_keyboard:
|
if reply_markup is None and remove_keyboard:
|
||||||
reply_markup = ReplyKeyboardRemove()
|
reply_markup = ReplyKeyboardRemove()
|
||||||
body = {
|
body = {
|
||||||
@ -104,7 +106,7 @@ class Core(TasksHandlerMixin):
|
|||||||
if self.message.voice:
|
if self.message.voice:
|
||||||
self.send_message(None, chat_to_send, method='send_voice', voice=self.message.voice.file_id)
|
self.send_message(None, chat_to_send, method='send_voice', voice=self.message.voice.file_id)
|
||||||
if self.message.video_note:
|
if self.message.video_note:
|
||||||
self.send_message(None, chat_to_send, method='send_data', data=self.message.video_note.file_id, data_type='video_note')
|
self.send_message(None, chat_to_send, method='send_video_note', data=self.message.video_note.file_id)
|
||||||
if self.message.animation:
|
if self.message.animation:
|
||||||
self.send_message(None, chat_to_send, method='send_animation', animation=self.message.animation.file_id)
|
self.send_message(None, chat_to_send, method='send_animation', animation=self.message.animation.file_id)
|
||||||
self.send_message(self.message_text, chat_to_send)
|
self.send_message(self.message_text, chat_to_send)
|
||||||
|
Loading…
Reference in New Issue
Block a user