From 3fd3ecd83516f70df57bf382eb43754deb3bfb78 Mon Sep 17 00:00:00 2001 From: Josee9988 Date: Mon, 21 Jun 2021 15:21:29 +0200 Subject: [PATCH] "fixed msg set" --- src/commands/commands-controller.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/commands/commands-controller.ts b/src/commands/commands-controller.ts index a8f341c..f95da98 100644 --- a/src/commands/commands-controller.ts +++ b/src/commands/commands-controller.ts @@ -107,10 +107,12 @@ export default class CommandsController { * @param msgToBeSet the message to be set. */ private async setSendMsg(message: Message, msgToBeSet: string[]): Promise { + let msg = ""; + for (const word of msgToBeSet) msg += word; if (!checkIfUserIsAdmin(message)) return; const server = await this.databaseController.findByServerId(message.guild.id); if (server.channelId) { - await this.databaseController.setSendMsg(message.guild.id, msgToBeSet[0]); + await this.databaseController.setSendMsg(message.guild.id, msg); await message.channel.send("Your message is set :)"); } else { // no channel specified await message.channel.send(":interrobang:Please specify a channel first with `!dimg channel nameOfYourChannel`");