mirror of
https://github.com/System-End/Discord-Bot.git
synced 2026-04-19 16:28:26 +00:00
Code made more compact
This commit is contained in:
parent
9736b26658
commit
6fc4e18bec
1 changed files with 8 additions and 12 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue