turn !status into /status now that theres proper commands
This commit is contained in:
17
commands/status.js
Normal file
17
commands/status.js
Normal file
@@ -0,0 +1,17 @@
|
||||
const { SlashCommandBuilder, ActivityType } = require('discord.js');
|
||||
|
||||
module.exports = {
|
||||
data: new SlashCommandBuilder()
|
||||
.setName('status')
|
||||
.setDescription('Change the bot\'s status message')
|
||||
.addStringOption(option =>
|
||||
option.setName('message')
|
||||
.setDescription('The new status message')
|
||||
.setRequired(true)
|
||||
),
|
||||
async execute(interaction) {
|
||||
const message = interaction.options.getString('message');
|
||||
interaction.client.user.setActivity(message, { type: ActivityType.Custom });
|
||||
await interaction.reply({ content: `Status updated to: ${message}`, ephemeral: true });
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user