move feeds to ptb
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import requests
|
||||
from telebot import TeleBot
|
||||
from telegram import Bot
|
||||
|
||||
from feeds.models import FeedModuleConfig
|
||||
|
||||
@@ -7,7 +7,7 @@ from feeds.models import FeedModuleConfig
|
||||
class DankMemesFeedModuleConfig(FeedModuleConfig):
|
||||
MODULE_NAME = 'Dank memes (Reddit)'
|
||||
|
||||
def execute(self, bot: TeleBot, chat_id, last_id):
|
||||
def execute(self, bot: Bot, chat_id, last_id):
|
||||
posts = requests.get('https://www.reddit.com/r/dankmemes/top.json?sort=top&t=hour',
|
||||
headers={'User-agent': 'bakatrouble FeedBot 0.1'}).json()
|
||||
for p in posts['data']['children']:
|
||||
|
Reference in New Issue
Block a user