Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for #311 #315

Merged
merged 2 commits into from
May 1, 2024
Merged

fix for #311 #315

merged 2 commits into from
May 1, 2024

Conversation

FaiThiX
Copy link
Contributor

@FaiThiX FaiThiX commented Apr 22, 2024

fix for #311

@@ -61,7 +61,10 @@ module.exports = {
await DiscordMessages.sendVoiceMessage(interaction,
client.intlGet(interaction.guildId, 'commandsVoiceBotJoinedVoice'));
client.log(client.intlGet(null, 'infoCap'), client.intlGet(interaction.guildId, 'commandsVoiceJoin',
{ name: voiceChannel.name, id: voiceChannel.id, guild: voiceChannel.guild.name }));
{ name: voiceChannel.name ? voiceChannel.name : client.intlGet(interaction.guildId, 'unknownVoiceChannelId'),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont think this will work either, this will give error when it tries to access the .name property during the condition. better to do the condition like this:

name: voiceChannel && voiceChannel.name ? voiceChannel.name : client.intl.....

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just changed it, thought it would fail if no name/id/guild is given and send the unknown phrase

@alexemanuelol
Copy link
Owner

Also perhaps just use the unknown phrase if the fail. The ones you added dont work well with the "commandsVoiceJoin" phrase.

@FaiThiX
Copy link
Contributor Author

FaiThiX commented Apr 30, 2024

@alexemanuelol changed everything you wanted

@alexemanuelol alexemanuelol merged commit de5bc5d into alexemanuelol:master May 1, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants