telegram_bots/feeds/modules/echo.py

15 lines
330 B
Python
Raw Normal View History

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