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
7ef3ebf196
commit
7c2b8eb27b
1 changed files with 6 additions and 7 deletions
|
|
@ -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