From ee19b2aa8d3c1125358f99137527f4e703e8eba0 Mon Sep 17 00:00:00 2001 From: Guams Date: Mon, 24 Mar 2025 19:36:49 +0100 Subject: [PATCH] /me command --- main.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/main.py b/main.py index f061082..c069df3 100644 --- a/main.py +++ b/main.py @@ -51,6 +51,11 @@ async def create_command(): "type": 3 } ] + }, + { # à améliorer en /profil <@user_id> + "name": "me", + "type": 1, + "description": "Afficher des informations sur vous", } ] @@ -316,13 +321,13 @@ async def get_event(response: Any): guild_id=response["d"]["guild"]["id"], avatar=response["d"]["member"]["user"]["avatar"], global_name=response["d"]["member"]["user"]["global_name"]) - elif response["d"]["type"] == InteractionType.APPLICATION_COMMAND and response["d"]["data"][ - "name"] == 'poll': + elif (response["d"]["type"] == InteractionType.APPLICATION_COMMAND and + response["d"]["data"]["name"] == 'poll'): await create_poll_form(interaction_id=response["d"]["id"], interaction_token=response["d"]["token"], guild_id=response["d"]["guild_id"]) - elif response["d"]["type"] == InteractionType.APPLICATION_COMMAND and response["d"]["data"][ - "name"] == 'bet': + elif (response["d"]["type"] == InteractionType.APPLICATION_COMMAND and + response["d"]["data"]["name"] == 'bet'): try: command_option: str = response["d"]["data"]["options"][0]["value"] if await guild_exists(conn=conn, guild_id=response["d"]["guild_id"]): @@ -373,4 +378,4 @@ async def main(): await gateway_connect -asyncio.run(main()) +asyncio.run(main()) \ No newline at end of file