TJtheDJ701

Axolotl Status Command

Oct 13th, 2021
889
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const { SlashCommandBuilder } = require('@discordjs/builders');
  2.  
  3. module.exports = {
  4.     data: new SlashCommandBuilder()
  5.         .setName('setstatus')
  6.         .setDescription('Sets my Status!')
  7.         .addStringOption(option =>
  8.             option.setName('status')
  9.                 .setDescription('What status')
  10.                 .setRequired(true)
  11.                 .addChoice('Do not Disturb', 'dnd')
  12.                 .addChoice('Idle', 'idle')
  13.                 .addChoice('Invisible', 'invisible')
  14.                 .addChoice('Online', 'online'))
  15.         .addStringOption(option =>
  16.             option.setName('activity')
  17.                 .setDescription('Set my Activity to..')
  18.                 .setRequired(true)),
  19.     async execute(interaction) {
  20.  
  21.         const client = interaction.client;
  22.  
  23.         if(interaction.user.toString() == '<@97470053615673344>' || interaction.user.toString() == '<@794485891740729344>') {
  24.             client.user.setPresence({ status: interaction.options.getString('status') });
  25.  
  26.             const activity = interaction.options.getString('activity');
  27.  
  28.             client.user.setActivity((activity), { type: 'LISTENING' });
  29.  
  30.             await interaction.reply({ content: 'Setting my status to, ' + '```' + interaction.options.getString('status') + '``` and setting my activity to ```' + activity + '```', ephemeral: false });
  31.         }
  32.         else{
  33.             await interaction.reply({ content: 'ummm your not tristan', ephemeral: true });
  34.         }
  35.  
  36.  
  37.     },
  38. };
RAW Paste Data