Karma
commited on
Commit
·
dc02936
1
Parent(s):
d6c0fda
nothing much
Browse files
Mikobot/plugins/pokedex.py
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
|
6 |
# <============================================== IMPORTS =========================================================>
|
7 |
from telegram import InlineKeyboardButton, InlineKeyboardMarkup, Update
|
8 |
-
from telegram.ext import
|
9 |
|
10 |
from Mikobot import function
|
11 |
from Mikobot.state import state
|
@@ -34,7 +34,7 @@ async def get_pokemon_info(name_or_id):
|
|
34 |
return None
|
35 |
|
36 |
|
37 |
-
async def pokedex(update: Update, context:
|
38 |
try:
|
39 |
if context.args:
|
40 |
name_or_id = context.args[0]
|
@@ -83,7 +83,7 @@ async def pokedex(update: Update, context: CallbackContext):
|
|
83 |
await update.message.reply_text(f"An error occurred: {str(e)}")
|
84 |
|
85 |
|
86 |
-
async def callback_query_handler(update: Update, context:
|
87 |
query = update.callback_query
|
88 |
await query.answer()
|
89 |
|
|
|
5 |
|
6 |
# <============================================== IMPORTS =========================================================>
|
7 |
from telegram import InlineKeyboardButton, InlineKeyboardMarkup, Update
|
8 |
+
from telegram.ext import ContextTypes, CallbackQueryHandler, CommandHandler
|
9 |
|
10 |
from Mikobot import function
|
11 |
from Mikobot.state import state
|
|
|
34 |
return None
|
35 |
|
36 |
|
37 |
+
async def pokedex(update: Update, context: ContextTypes.DEFAULT_TYPE):
|
38 |
try:
|
39 |
if context.args:
|
40 |
name_or_id = context.args[0]
|
|
|
83 |
await update.message.reply_text(f"An error occurred: {str(e)}")
|
84 |
|
85 |
|
86 |
+
async def callback_query_handler(update: Update, context: ContextTypes.DEFAULT_TYPE):
|
87 |
query = update.callback_query
|
88 |
await query.answer()
|
89 |
|