remove chat_id
Signed-off-by: Omar Sánchez Pizarro <omar.sanchez@pistacero.net>
This commit is contained in:
@@ -1,3 +1,2 @@
|
||||
telegram_token: ""
|
||||
telegram_channel: "@canal_o_grupo"
|
||||
telegram_chat_id: 0
|
||||
|
||||
@@ -29,9 +29,8 @@ FAVORITES_FILE = "favorites.json"
|
||||
class TelegramManager:
|
||||
def __init__(self):
|
||||
self.logger = logging.getLogger(__name__)
|
||||
token, channel, chat_id = self.get_config()
|
||||
token, channel = self.get_config()
|
||||
self._channel = channel
|
||||
self._chat_id = chat_id
|
||||
# Use ApplicationBuilder to create the bot application with increased timeouts
|
||||
self._application = telegram.ext.ApplicationBuilder() \
|
||||
.token(token) \
|
||||
@@ -61,8 +60,7 @@ class TelegramManager:
|
||||
config = yaml.safe_load(file)
|
||||
token = config['telegram_token']
|
||||
telegram_channel = config['telegram_channel']
|
||||
telegram_chat_id = config['telegram_chat_id']
|
||||
return token, telegram_channel, telegram_chat_id
|
||||
return token, telegram_channel
|
||||
|
||||
def escape_html(self, text):
|
||||
return html.escape(str(text))
|
||||
|
||||
Reference in New Issue
Block a user