2019-01-19 02:50:16 +00:00
|
|
|
from django.db import models
|
2021-03-20 13:21:13 +00:00
|
|
|
from telegram import Bot
|
2019-01-19 02:50:16 +00:00
|
|
|
|
|
|
|
from feeds.models import FeedModuleConfig
|
|
|
|
|
|
|
|
|
|
|
|
class EchoFeedModuleConfig(FeedModuleConfig):
|
|
|
|
message = models.TextField()
|
|
|
|
|
|
|
|
MODULE_NAME = 'Echo'
|
|
|
|
|
2021-03-20 13:21:13 +00:00
|
|
|
def execute(self, bot: Bot, chat_id, last_id):
|
2019-01-19 02:50:16 +00:00
|
|
|
bot.send_message(chat_id, self.message)
|
2019-02-04 09:15:53 +00:00
|
|
|
yield None
|