From f49413b7d76eac7c632062d3b885cac8cf68612f Mon Sep 17 00:00:00 2001 From: emmatveev Date: Sat, 30 Nov 2024 13:08:18 +0300 Subject: [PATCH] fix --- bot.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bot.py b/bot.py index d2108a9..42495d0 100644 --- a/bot.py +++ b/bot.py @@ -11,6 +11,9 @@ class Core(TasksHandlerMixin): return 'roulette_bot_worker' def process(self, payload): + from telebot import TeleBot + bot = TeleBot() + bot.send_sticker() message: Message = Message.de_json(json.dumps(payload)) self.message = message self.chat_id = message.chat.id @@ -100,11 +103,11 @@ class Core(TasksHandlerMixin): if self.message.photo: self.send_message(None, chat_to_send, method='send_photo', photo=self.message.photo[-1].file_id) if self.message.sticker: - self.send_message(None, chat_to_send, method='send_sticker', data=self.message.sticker.file_id) + self.send_message(None, chat_to_send, method='send_data', data=self.message.sticker.file_id, data_type='sticker') if self.message.voice: self.send_message(None, chat_to_send, method='send_voice', voice=self.message.voice.file_id) if self.message.video_note: - self.send_message(None, chat_to_send, method='send_video_note', data=self.message.video_note.file_id) + self.send_message(None, chat_to_send, method='send_data', data=self.message.video_note.file_id, data_type='video_note') if self.message.animation: 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)