mirror of
https://github.com/System-End/Discord-Bot.git
synced 2026-04-19 19:45:16 +00:00
Merge pull request #87 from DotwoodMedia/patch-1
Removed redundant code
This commit is contained in:
commit
0e8996e6f7
3 changed files with 24 additions and 39 deletions
|
|
@ -9,26 +9,16 @@ const StarBoard = require("../../database/models/starboardChannels");
|
|||
module.exports = async (client, interaction, args) => {
|
||||
const choice = interaction.options.getString('setup');
|
||||
const channel = interaction.options.getChannel('channel');
|
||||
|
||||
const choices = {
|
||||
birthdays : Birthdays,
|
||||
chatbot : Chatbot,
|
||||
reviews : Review,
|
||||
suggestions : Suggestion,
|
||||
starboard : StarBoard
|
||||
};
|
||||
|
||||
if (choice == "birthdays") {
|
||||
client.createChannelSetup(Birthdays, channel, interaction)
|
||||
}
|
||||
|
||||
if (choice == "chatbot") {
|
||||
client.createChannelSetup(Chatbot, channel, interaction)
|
||||
}
|
||||
|
||||
if (choice == "reviews") {
|
||||
client.createChannelSetup(Review, channel, interaction)
|
||||
}
|
||||
|
||||
if (choice == "suggestions") {
|
||||
client.createChannelSetup(Suggestion, channel, interaction)
|
||||
}
|
||||
|
||||
if (choice == "starboard") {
|
||||
client.createChannelSetup(StarBoard, channel, interaction)
|
||||
}
|
||||
client.createChannelSetup(choices[choice], channel, interaction);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -7,18 +7,14 @@ const levelLogs = require("../../database/models/levelChannels");
|
|||
module.exports = async (client, interaction, args) => {
|
||||
const choice = interaction.options.getString('setup');
|
||||
const channel = interaction.options.getChannel('channel');
|
||||
|
||||
const choices = {
|
||||
serverLogs : logs,
|
||||
levelLogs : levelLogs,
|
||||
boostLogs : boostLogs
|
||||
};
|
||||
|
||||
if (choice == "serverLogs") {
|
||||
client.createChannelSetup(logs, channel, interaction)
|
||||
}
|
||||
|
||||
if (choice == "levelLogs") {
|
||||
client.createChannelSetup(levelLogs, channel, interaction)
|
||||
}
|
||||
|
||||
if (choice == "boostLogs") {
|
||||
client.createChannelSetup(boostLogs, channel, interaction)
|
||||
}
|
||||
client.createChannelSetup(choices[choice], channel, interaction);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -7,13 +7,12 @@ module.exports = async (client, interaction, args) => {
|
|||
const choice = interaction.options.getString('setup');
|
||||
const channel = interaction.options.getChannel('channel');
|
||||
|
||||
if (choice == "welcomechannel") {
|
||||
client.createChannelSetup(welcomeChannel, channel, interaction)
|
||||
}
|
||||
const choices = {
|
||||
welcomechannel : welcomeChannel,
|
||||
leavechannel : leaveChannel
|
||||
};
|
||||
|
||||
if (choice == "leavechannel") {
|
||||
client.createChannelSetup(leaveChannel, channel, interaction)
|
||||
}
|
||||
client.createChannelSetup(choices[choice], channel, interaction);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue