From 59821a21d3487175357f6a989e08f845835db29c Mon Sep 17 00:00:00 2001 From: liushuyu Date: Sat, 2 May 2020 16:47:26 -0600 Subject: [PATCH] bugfixes: grantDeveloper fix and exit on error --- src/commands/grantDeveloper.ts | 2 +- src/logging.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands/grantDeveloper.ts b/src/commands/grantDeveloper.ts index a0858a5..910ccae 100644 --- a/src/commands/grantDeveloper.ts +++ b/src/commands/grantDeveloper.ts @@ -11,7 +11,7 @@ export function command (message: discord.Message) { member.roles.remove(role); message.channel.send(`${user.toString()}'s speech has been revoked in the #development channel.`); } else { - member.roles.remove(role); + member.roles.add(role); message.channel.send(`${user.toString()} has been granted speech in the #development channel.`); } }); diff --git a/src/logging.ts b/src/logging.ts index 36ccb9b..1995733 100644 --- a/src/logging.ts +++ b/src/logging.ts @@ -13,7 +13,7 @@ const logger = winston.createLogger({ handleExceptions: true }) ], - exitOnError: false, + exitOnError: true, }); // Setup logging for LogDNA cloud logging.