telegram_bots/feeds/modules/echo.py
2021-03-20 16:21:13 +03:00

15 lines
323 B
Python

from django.db import models
from telegram import Bot
from feeds.models import FeedModuleConfig
class EchoFeedModuleConfig(FeedModuleConfig):
message = models.TextField()
MODULE_NAME = 'Echo'
def execute(self, bot: Bot, chat_id, last_id):
bot.send_message(chat_id, self.message)
yield None