Skip to content

Commit

Permalink
fix(info): Fix missing message
Browse files Browse the repository at this point in the history
Fixes BOT-27K
  • Loading branch information
Marco (Valandur) committed Dec 8, 2019
1 parent 2b9ed4e commit c066ea7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/invites/commands/invites/info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ export default class extends Command {
const replyMessage = await this.sendReply(message, embed);
embed.description = null;

// If we couldn't send the initial message we're probably missing some permissions, so just exit
if (!replyMessage) {
return;
}

const invitedMembers = await this.client.db.getInvitedMembers(guild.id, user.id);
const customInvs = await this.client.db.getCustomInvitesForMember(guild.id, user.id);
customInvs.sort((a, b) => b.createdAt.getTime() - a.createdAt.getTime());
Expand Down

0 comments on commit c066ea7

Please sign in to comment.