mirror of
https://github.com/Noettore/lagomareGateKeeperBot.git
synced 2025-10-15 03:26:40 +02:00
Resolve type assertions
This commit is contained in:
@@ -12,6 +12,9 @@ async def post_init(application: Application, bot_config: BotConfig) -> None:
|
||||
await application.bot.set_my_commands(bot_config.commands)
|
||||
|
||||
async def start(update: Update, context: ContextTypes.DEFAULT_TYPE, users: Users):
|
||||
assert update.effective_user is not None
|
||||
assert update.message is not None
|
||||
|
||||
user_id = str(update.effective_user.id)
|
||||
role = users.get_role(user_id)
|
||||
keyboard = []
|
||||
@@ -39,6 +42,7 @@ async def start(update: Update, context: ContextTypes.DEFAULT_TYPE, users: Users
|
||||
|
||||
async def handle_main_menu_callback(update: Update, context: ContextTypes.DEFAULT_TYPE, users: Users, gates: Gates):
|
||||
query = update.callback_query
|
||||
assert query is not None
|
||||
data = query.data
|
||||
if data == "open_gate_menu":
|
||||
await open_gate_menu(update, context, gates=gates)
|
||||
|
Reference in New Issue
Block a user