diff --git a/src/interactions/leaderAdd.js b/src/interactions/leaderAdd.js index 4f4a5dcd..f3a1cf28 100644 --- a/src/interactions/leaderAdd.js +++ b/src/interactions/leaderAdd.js @@ -17,6 +17,10 @@ const interactionLeaderAdd = async (bot, message) => { throw transcript('leaderAdd.invalidClub') } + if (!recipientClub) { + throw transcript('leaderAdd.clubNotFound') + } + if (commandUser.club && commandUser.club.id != recipientClub.id) { // A leader is trying to permission someone to a channel that's not their // club channel diff --git a/src/utils/transcript.yml b/src/utils/transcript.yml index 1570fb54..8bd23911 100644 --- a/src/utils/transcript.yml +++ b/src/utils/transcript.yml @@ -340,6 +340,7 @@ leaderAdd: Additionally, you can see a list of who is already a leader with \`/leader-list\` invalidAuth: I couldn't find your club. Only registered leaders or operations team members can run this command. invalidChannel: This isn't your club channel. Please run this in a channel you lead. + clubNotFound: This channel isn't tied to a club! Please run this in a club channel. alreadyLeader: They're already a leader in your club! success: And... done! I've added <@${this.taggedUserID}> to the club in <#${this.channel}>. leaderList: