61 lines
1.6 KiB
TypeScript
61 lines
1.6 KiB
TypeScript
import {
|
|
ChatInputCommandInteraction, EmbedBuilder,
|
|
PermissionsBitField,
|
|
SlashCommandBuilder,
|
|
SlashCommandChannelOption,
|
|
} from 'discord.js';
|
|
import {ChannelType} from 'discord-api-types/v10';
|
|
import {Bot} from "../bot";
|
|
|
|
export default {
|
|
data: new SlashCommandBuilder()
|
|
.setName('getvalues')
|
|
.setDescription('Show all the currently set properties of the bot.')
|
|
.setDefaultMemberPermissions(PermissionsBitField.Flags.Administrator),
|
|
async execute(interaction: ChatInputCommandInteraction) {
|
|
const bot = Bot.getInstance();
|
|
console.log('channel: ' + bot .getChannel() + ' counter: ' + bot.getCounter() + ' lastUser: ' + bot.getLastUser() + ' modRole: ' + bot.getModRole() + ' ignorePrefix: ' + bot.getIgnorePrefix() + ' autoEmbedMessages: ' + bot.getAutoEmbedMessages());
|
|
|
|
const embed = new EmbedBuilder()
|
|
.setTitle('Bot Properties')
|
|
.setDescription('This is a list of all the bots currently set properties')
|
|
.setColor(0xffe600)
|
|
.setFields([
|
|
{
|
|
name: 'channel',
|
|
value: bot.getChannel(),
|
|
inline: true,
|
|
},
|
|
{
|
|
name: 'counter',
|
|
value: bot.getCounter().toString(),
|
|
inline: true,
|
|
},
|
|
{
|
|
name: 'lastUser',
|
|
value: '<@' + bot.getLastUser() + '>',
|
|
inline: true,
|
|
},
|
|
{
|
|
name: 'modRole',
|
|
value: '<@&' + bot.getModRole() + '>',
|
|
inline: true,
|
|
},
|
|
{
|
|
name: 'ignorePrefix',
|
|
value: bot.getIgnorePrefix(),
|
|
inline: true,
|
|
},
|
|
{
|
|
name: 'autoEmbedMessages',
|
|
value: bot.getAutoEmbedMessages().toString(),
|
|
inline: true,
|
|
},
|
|
]);
|
|
|
|
return await interaction.reply({
|
|
embeds: [embed],
|
|
ephemeral: true,
|
|
});
|
|
},
|
|
}; |