From d620b20ecf906f3d355ff6e3f3f4809ec6817df8 Mon Sep 17 00:00:00 2001 From: Kira Date: Sat, 20 Dec 2025 07:31:45 -0500 Subject: [PATCH] turn !status into /status now that theres proper commands --- commands/status.js | 17 +++++++++++++++++ index.js | 6 ------ 2 files changed, 17 insertions(+), 6 deletions(-) create mode 100644 commands/status.js diff --git a/commands/status.js b/commands/status.js new file mode 100644 index 0000000..6cafa9a --- /dev/null +++ b/commands/status.js @@ -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 }); + }, +}; \ No newline at end of file diff --git a/index.js b/index.js index 2c3e461..d00d7e0 100644 --- a/index.js +++ b/index.js @@ -82,12 +82,6 @@ client.on(Events.MessageCreate, message => { ) } - if (message.content.startsWith('!status') && config.parentsAndOrGuardians.includes(message.author.id)) { - let status = message.content.substring('!status'.length).trim(); - client.user.setActivity(status, { type: ActivityType.Custom }); - config.status = status; - } - // wouldnt it be funny to react to 1 in like 1000 messages with emoji from a list if (Math.random() < 0.001 && !message.author.bot) { const customEmojis = [