add spawn command

This commit is contained in:
KGT1 2020-09-30 17:37:15 +02:00
parent 0b76f59077
commit 5eda09d559

View File

@ -181,6 +181,13 @@ function handleChannelMessage (message) {
const errorMessage = getDiscordEmbedError(error); const errorMessage = getDiscordEmbedError(error);
message.channel.send(errorMessage); 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")) { } else if (message.content.startsWith(CONFIG["discord-prefix"] + "help")) {
/* eslint-disable quotes */ /* eslint-disable quotes */
const reply = new Discord.MessageEmbed() const reply = new Discord.MessageEmbed()
@ -204,6 +211,9 @@ function handleChannelMessage (message) {
}, { }, {
name: `${CONFIG["discord-prefix"]}skip`, name: `${CONFIG["discord-prefix"]}skip`,
value: "Skip this Song" value: "Skip this Song"
}, {
name: `${CONFIG["discord-prefix"]}spawn`,
value: "Spawns an Interactive Play Controller"
}, { }, {
name: `${CONFIG["discord-prefix"]}help`, name: `${CONFIG["discord-prefix"]}help`,
value: "Display this help message" value: "Display this help message"