/me command
This commit is contained in:
parent
ee017f740c
commit
1a6e8da055
13
main.py
13
main.py
@ -51,6 +51,11 @@ async def create_command():
|
|||||||
"type": 3
|
"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"],
|
guild_id=response["d"]["guild"]["id"],
|
||||||
avatar=response["d"]["member"]["user"]["avatar"],
|
avatar=response["d"]["member"]["user"]["avatar"],
|
||||||
global_name=response["d"]["member"]["user"]["global_name"])
|
global_name=response["d"]["member"]["user"]["global_name"])
|
||||||
elif response["d"]["type"] == InteractionType.APPLICATION_COMMAND and response["d"]["data"][
|
elif (response["d"]["type"] == InteractionType.APPLICATION_COMMAND and
|
||||||
"name"] == 'poll':
|
response["d"]["data"]["name"] == 'poll'):
|
||||||
await create_poll_form(interaction_id=response["d"]["id"],
|
await create_poll_form(interaction_id=response["d"]["id"],
|
||||||
interaction_token=response["d"]["token"],
|
interaction_token=response["d"]["token"],
|
||||||
guild_id=response["d"]["guild_id"])
|
guild_id=response["d"]["guild_id"])
|
||||||
elif response["d"]["type"] == InteractionType.APPLICATION_COMMAND and response["d"]["data"][
|
elif (response["d"]["type"] == InteractionType.APPLICATION_COMMAND and
|
||||||
"name"] == 'bet':
|
response["d"]["data"]["name"] == 'bet'):
|
||||||
try:
|
try:
|
||||||
command_option: str = response["d"]["data"]["options"][0]["value"]
|
command_option: str = response["d"]["data"]["options"][0]["value"]
|
||||||
if await guild_exists(conn=conn, guild_id=response["d"]["guild_id"]):
|
if await guild_exists(conn=conn, guild_id=response["d"]["guild_id"]):
|
||||||
|
Loading…
Reference in New Issue
Block a user