Skip to content

Commit

Permalink
Disable info command when links are disallowed
Browse files Browse the repository at this point in the history
  • Loading branch information
gruppler committed Jul 7, 2024
1 parent 780c6a4 commit 4b25103
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion commands/info.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ module.exports = {
async execute(interaction) {
const gameData = getGameData(interaction);
if (gameData) {
return sendMessage(interaction, JSON.stringify(gameData), true);
if(gameData.allowLinks === false){
return sendMessage(interaction, "Sorry, this command is unavailable when links are disallowed.", true);
} else {
return sendMessage(interaction, JSON.stringify(gameData), true);
}
} else if (!isGameOngoing(interaction)) {
return sendMessage(
interaction,
Expand Down

0 comments on commit 4b25103

Please sign in to comment.