settings view
This commit is contained in:
2 files changed
+37
-4
No files matched your search
+30
-1
@@ -1,4 +1,4 @@
|
||||
const { MessageEmbed } = require('discord.js');
|
||||
const { MessageEmbed, Guild } = require('discord.js');
|
||||
|
||||
module.exports = {
|
||||
name: "settings",
|
||||
@@ -135,6 +135,12 @@ module.exports = {
|
||||
required: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "view",
|
||||
description: "view current settings configuration",
|
||||
value: "view",
|
||||
type: 1,
|
||||
}
|
||||
],
|
||||
/**
|
||||
@@ -478,6 +484,29 @@ module.exports = {
|
||||
.setColor('GREEN');
|
||||
|
||||
return interaction.send({ embeds: [successEmbed] });
|
||||
|
||||
} else if (args[0].name == 'view') {
|
||||
const tweetChannel = client.exists(GuildDB.tweetChannel) ? `\n╚➤ <#${GuildDB.tweetChannel}>` : '';
|
||||
const tweetColor = client.exists(GuildDB.tweetChannel) ? '+ ' : '- ';
|
||||
const actionChannel = client.exists(GuildDB.actionChannel) ? `\n╚➤ <#${GuildDB.actionChannel}>` : '';
|
||||
const actionColor = client.exists(GuildDB.actionChannel) ? '+ ' : '- ';
|
||||
const channelsInfo = GuildDB.customChannelStatus ? '\n╚➤ \`/channels\` to view' : '';
|
||||
const channelColor = GuildDB.customChannelStatus ? '+ ' : '- ';
|
||||
const incomeInfo = GuildDB.incomeRoleStatus ? '\n╚➤ \`/work-roles\` to view' : '';
|
||||
const incomeColor = GuildDB.incomeRoleStatus ? '+ ' : '- ';
|
||||
const settingsEmbed = new MessageEmbed()
|
||||
.setColor(client.config.EmbedColor)
|
||||
.setTitle('Current Guild Configurations')
|
||||
.addFields(
|
||||
{ name: 'Guild ID', value: `\`\`\`arm\n${GuildDB.serverID}\`\`\``, inline: true },
|
||||
{ name: 'Has Income Roles?', value: `\`\`\`diff\n${incomeColor}${GuildDB.incomeRoleStatus}\`\`\`${incomeInfo}`, inline: true },
|
||||
{ name: 'Has Allowed Channels?', value: `\`\`\`diff\n${channelColor}${GuildDB.customChannelStatus}\`\`\`${channelsInfo}`, inline: true },
|
||||
{ name: 'Has Tweet Channel?', value: `\`\`\`diff\n${tweetColor}${client.exists(GuildDB.tweetChannel)}\`\`\`${tweetChannel}`, inline: true },
|
||||
{ name: 'Has Action Channel?', value: `\`\`\`diff\n${actionColor}${client.exists(GuildDB.actionChannel)}\`\`\`${actionChannel}`, inline: true },
|
||||
{ name: 'Starting Balance', value: `\`\`\`arm\n$${GuildDB.startingBalance}\`\`\``, inline: true },
|
||||
);
|
||||
|
||||
return interaction.send({ embeds: [settingsEmbed] });
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user