Skip to content

Commit

Permalink
failsafe vote command
Browse files Browse the repository at this point in the history
  • Loading branch information
ProgramPhoenix committed Aug 2, 2023
1 parent f586628 commit 5b10b08
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion modules/vote/voteCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,12 @@ export default {
]
},
handler: async function(interaction: CommandInteraction) {

try {
await interaction.channel.fetch();
} catch {
await interaction.reply("Not in this channel! Move to a channel the bot has access to.");
return;
}
// --- Variables
let usedVotes = 0;
let msg = "";
Expand Down

0 comments on commit 5b10b08

Please sign in to comment.