mirror of
https://github.com/deadcxap/YandexMusicDiscordBot.git
synced 2026-01-10 12:31:46 +03:00
fix: Rewrite RawReactionActionEvent checks.
This commit is contained in:
@@ -88,9 +88,9 @@ class PlayButton(Button, VoiceExtension):
|
||||
raise ValueError(f"Unknown item type: '{type(self.item).__name__}'")
|
||||
|
||||
if guild['vote_add'] and len(channel.members) > 2 and not member.guild_permissions.manage_channels:
|
||||
logging.debug(f"Starting vote for '{action}' (from PlayButton callback)")
|
||||
logging.info(f"Starting vote for '{action}' (from PlayButton callback)")
|
||||
|
||||
message = cast(discord.Interaction, await interaction.respond(vote_message, delete_after=30))
|
||||
message = cast(discord.Interaction, await interaction.respond(vote_message, delete_after=60))
|
||||
response = await message.original_response()
|
||||
|
||||
await response.add_reaction('✅')
|
||||
|
||||
@@ -322,7 +322,7 @@ class MyVibeSelect(Select, VoiceExtension):
|
||||
|
||||
custom_id = interaction.custom_id
|
||||
if custom_id not in ('diversity', 'mood', 'lang'):
|
||||
logging.warning(f'[MENU] Unknown custom_id: {custom_id}')
|
||||
logging.error(f'[MENU] Unknown custom_id: {custom_id}')
|
||||
return
|
||||
|
||||
if not interaction.data:
|
||||
@@ -335,7 +335,7 @@ class MyVibeSelect(Select, VoiceExtension):
|
||||
'favorite', 'popular', 'discover', 'default',
|
||||
'not-russian', 'russian', 'without-words', 'any'
|
||||
):
|
||||
logging.warning(f'[MENU] Unknown data_value: {data_values}')
|
||||
logging.error(f'[MENU] Unknown data_value: {data_values}')
|
||||
return
|
||||
|
||||
logging.info(f"[MENU] Settings option '{custom_id}' updated to '{data_values[0]}'")
|
||||
|
||||
Reference in New Issue
Block a user