Skip to content

Commit

Permalink
rss fixed issue
Browse files Browse the repository at this point in the history
  • Loading branch information
weebzone authored Nov 27, 2022
1 parent 4ca1706 commit 5a17a76
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions bot/modules/rss.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
from time import sleep
from telegram.ext import CommandHandler, CallbackQueryHandler
from threading import Lock, Thread
from copy import deepcopy

from bot import dispatcher, job_queue, rss_dict, LOGGER, DATABASE_URL, config_dict
from bot import dispatcher, job_queue, rss_dict, LOGGER, DATABASE_URL, config_dict, RSS_DELAY, RSS_CHAT_ID
from bot.helper.telegram_helper.message_utils import sendMessage, editMessage, sendMarkup, auto_delete_message, sendRss
from bot.helper.telegram_helper.filters import CustomFilters
from bot.helper.telegram_helper.bot_commands import BotCommands
Expand Down Expand Up @@ -230,7 +229,7 @@ def rss_monitor(context):
LOGGER.error(f"{e} Feed Name: {title} - Feed Link: {data['link']}")
continue

if DATABASE_URL and config_dict['RSS_CHAT_ID']:
if DATABASE_URL and RSS_CHAT_ID:
rss_list_handler = CommandHandler(BotCommands.RssListCommand, rss_list,
filters=CustomFilters.owner_filter | CustomFilters.sudo_user, run_async=True)
rss_get_handler = CommandHandler(BotCommands.RssGetCommand, rss_get,
Expand All @@ -250,4 +249,4 @@ def rss_monitor(context):
dispatcher.add_handler(rss_settings_handler)
dispatcher.add_handler(rss_buttons_handler)
rss_job = job_queue.run_repeating(rss_monitor, interval=RSS_DELAY, first=20, name="RSS")
rss_job.enabled = True
rss_job.enabled = True

0 comments on commit 5a17a76

Please sign in to comment.