Update deploy-commands.js

This commit is contained in:
VinceC
2024-11-24 03:25:10 -06:00
parent 1cee965d00
commit c62c1f81e4

View File

@@ -1,4 +1,3 @@
// deploy-commands.js
const { REST, Routes, SlashCommandBuilder } = require('discord.js'); const { REST, Routes, SlashCommandBuilder } = require('discord.js');
require('dotenv').config(); require('dotenv').config();
@@ -28,27 +27,48 @@ const commands = [
option.setName('game') option.setName('game')
.setDescription('Filter by game') .setDescription('Filter by game')
.setRequired(false)), .setRequired(false)),
new SlashCommandBuilder() // New subscription commands
.setName('subscribe') new SlashCommandBuilder()
.setDescription('Subscribe to notifications for a game') .setName('subscribe')
.addStringOption(option => .setDescription('Subscribe to game notifications')
option.setName('game') .addStringOption(option =>
.setDescription('The game to subscribe to') option.setName('game')
.setRequired(true)) .setDescription('Game to subscribe to')
.addChannelOption(option => .setRequired(true)
option.setName('channel') .addChoices(
.setDescription('The channel to receive notifications (default: current channel)') { name: 'Big Ballers VR', value: 'Big Ballers VR' },
.setRequired(false)), { name: 'Blacktop Hoops', value: 'Blacktop Hoops' },
new SlashCommandBuilder() { name: 'Breachers', value: 'Breachers' },
.setName('unsubscribe') { name: 'Echo Arena', value: 'Echo Arena' },
.setDescription('Unsubscribe from notifications for a game') { name: 'Echo Combat', value: 'Echo Combat' },
.addStringOption(option => { name: 'Gun Raiders', value: 'Gun Raiders' },
option.setName('game') { name: 'Nock', value: 'Nock' },
.setDescription('The game to unsubscribe from') { name: 'VAIL', value: 'VAIL' }
.setRequired(true)), ))
new SlashCommandBuilder() .addChannelOption(option =>
.setName('listsubscriptions') option.setName('channel')
.setDescription('List all active subscriptions for this server'), .setDescription('Channel for notifications')
.setRequired(true)),
new SlashCommandBuilder()
.setName('unsubscribe')
.setDescription('Unsubscribe from game notifications')
.addStringOption(option =>
option.setName('game')
.setDescription('Game to unsubscribe from')
.setRequired(true)
.addChoices(
{ name: 'Big Ballers VR', value: 'Big Ballers VR' },
{ name: 'Blacktop Hoops', value: 'Blacktop Hoops' },
{ name: 'Breachers', value: 'Breachers' },
{ name: 'Echo Arena', value: 'Echo Arena' },
{ name: 'Echo Combat', value: 'Echo Combat' },
{ name: 'Gun Raiders', value: 'Gun Raiders' },
{ name: 'Nock', value: 'Nock' },
{ name: 'VAIL', value: 'VAIL' }
)),
new SlashCommandBuilder()
.setName('list_subscriptions')
.setDescription('List all game subscriptions for this server')
]; ];
const rest = new REST({ version: '10' }).setToken(process.env.BOT_TOKEN); const rest = new REST({ version: '10' }).setToken(process.env.BOT_TOKEN);