fixed not working due to type hints

This commit is contained in:
Gourav Kumar 2022-01-10 07:06:20 +05:30
parent 95a7a45c04
commit b77f85e2da

View File

@ -9,6 +9,8 @@ import logging
import os import os
import psycopg2 import psycopg2
import requests import requests
import telegram
import telegram.ext
import time import time
from bs4 import BeautifulSoup from bs4 import BeautifulSoup
@ -16,6 +18,7 @@ from dotenv import load_dotenv
from telegram import ParseMode, InlineKeyboardButton, InlineKeyboardMarkup from telegram import ParseMode, InlineKeyboardButton, InlineKeyboardMarkup
from telegram.ext import Updater, CommandHandler, MessageHandler, Filters, CallbackQueryHandler from telegram.ext import Updater, CommandHandler, MessageHandler, Filters, CallbackQueryHandler
load_dotenv() load_dotenv()
logging.basicConfig(filename='logs/word_bot.log', filemode='a', format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', logging.basicConfig(filename='logs/word_bot.log', filemode='a', format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
@ -142,7 +145,6 @@ def button(
update: telegram.update.Update, update: telegram.update.Update,
context: telegram.ext.callbackcontext.CallbackContext context: telegram.ext.callbackcontext.CallbackContext
) -> None: ) -> None:
""" Responds to callback buttons in the original message. """ Responds to callback buttons in the original message.
If the callback type is audio, then responds with already available audio URL If the callback type is audio, then responds with already available audio URL