/me command

This commit is contained in:
Guams 2025-03-24 19:36:49 +01:00 committed by guams
parent ee017f740c
commit ee19b2aa8d

15
main.py
View File

@ -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())