Skip to content

Commit

Permalink
fix(messaging): Fix error while handling error
Browse files Browse the repository at this point in the history
Fixes BOT-1SN
  • Loading branch information
Marco Crespi committed Nov 25, 2019
1 parent bdcde45 commit 61112da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/framework/services/Messaging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export class MessagingService {
let msg =
'I encountered an error when trying to send a message. ' +
`Please report this to a developer:\n\`\`\`${error ? error.message : 'Unknown'}\`\`\``;
if (error.code === 50013) {
if (error && error.code === 50013) {
const name = this.client.user.username;
msg =
`**${name} does not have permissions to post to that channel.\n` +
Expand Down

0 comments on commit 61112da

Please sign in to comment.