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
