Skip to content

Commit

Permalink
modified channel to channelId
Browse files Browse the repository at this point in the history
  • Loading branch information
xero-lib committed May 3, 2024
1 parent a0c4c7c commit dd43205
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions commands/tsjoin.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default async function (interaction) {
interaction.member.permissions.has(PermissionsBitField.Flags.Administrator) ||
interaction.member.id === developer.id
) {
if (interaction.member.voice.channel && type == "voice") {//if the user is in a voice channel and also passed the "voice" argument
if (interaction.member.voice.channelId && type == "voice") {//if the user is in a voice channel and also passed the "voice" argument
interaction.member.roles.add(findRole(interaction.guild, "Stick Holder")).catch(() =>
datedErr("Could not add Stick holder to", `${interaction.user.username} (${interaction.user.id}) in ${interaction.guild.name}`)
); //Add interaction author to Stick Holder
Expand Down Expand Up @@ -86,7 +86,7 @@ export default async function (interaction) {
}
else if(!interaction.member.voice.channelId && type == "voice") {
interaction.reply({ content: "You need to join a voice channel first!", ephemeral: true });
console.log(JSON.stringify(interaction.member)); // debugging
console.log(JSON.stringify(interaction.member.voice)); // debugging
}
} else interaction.reply({ content: "You do not have permission to do this.", ephemeral: false });
} else interaction.reply({ content: `Please run \`/tsinit\` to create the required roles`, ephemeral: false });
Expand Down

0 comments on commit dd43205

Please sign in to comment.