Last active
March 11, 2023 18:13
-
-
Save 1ort/4b9a830800b431092e8bca03c4c8dac0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
disp = { | |
"button_1": ( | |
"Вы выбрали организацию транспортировки.", | |
[ | |
guild.get_role(config.ROLE_ID_TheHeadInnkeeper), | |
guild.get_role(config.ROLE_ID_TheRoyalFamily), | |
guild.get_role(config.ROLE_ID_Courier), | |
guild.get_role(config.ROLE_ID_Porter), | |
guild.get_role(config.ROLE_ID_Security), | |
guild.get_role(config.ROLE_ID_Technician), | |
], | |
"Организация Транспортировки | Guest Static", | |
2, | |
), | |
"button_2": ..., | |
"button_3": ..., | |
"button_4": ..., | |
"button_5": ..., | |
"button_6": ..., | |
"button_7": ..., | |
} | |
@client.event | |
async def on_interaction(interaction): | |
try: | |
message_text, roles, local_name, price = disp[interaction.data["custom_id"]] | |
except KeyError: | |
... # Обработка непредусмотренной кнопки | |
else: | |
await interaction.response.send_message(message_text, ephemeral=True) | |
await threader(local_name, roles, interaction) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment