From 5eda09d559ba715c6f7291ee82a5a66e64bfab08 Mon Sep 17 00:00:00 2001 From: KGT1 Date: Wed, 30 Sep 2020 17:37:15 +0200 Subject: [PATCH] add spawn command --- src/messagehandler.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/messagehandler.js b/src/messagehandler.js index 1058ccb..b192fb7 100644 --- a/src/messagehandler.js +++ b/src/messagehandler.js @@ -181,6 +181,13 @@ function handleChannelMessage (message) { const errorMessage = getDiscordEmbedError(error); message.channel.send(errorMessage); } + } else if (message.content.startsWith(CONFIG["discord-prefix"] + "spawn")) { + try { + playbackmanager.spawnPlayMessage(message) + } catch (error) { + const errorMessage = getDiscordEmbedError(error); + message.channel.send(errorMessage); + } } else if (message.content.startsWith(CONFIG["discord-prefix"] + "help")) { /* eslint-disable quotes */ const reply = new Discord.MessageEmbed() @@ -204,6 +211,9 @@ function handleChannelMessage (message) { }, { name: `${CONFIG["discord-prefix"]}skip`, value: "Skip this Song" + }, { + name: `${CONFIG["discord-prefix"]}spawn`, + value: "Spawns an Interactive Play Controller" }, { name: `${CONFIG["discord-prefix"]}help`, value: "Display this help message"