update test
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
// deploycommands.js
|
||||
|
||||
const { REST, Routes, SlashCommandBuilder } = require('discord.js');
|
||||
require('dotenv').config();
|
||||
|
||||
@@ -11,7 +13,11 @@ const commands = [
|
||||
.addStringOption(option =>
|
||||
option.setName('username')
|
||||
.setDescription('The username to search for')
|
||||
.setRequired(true)),
|
||||
.setRequired(true))
|
||||
.addStringOption(option =>
|
||||
option.setName('game')
|
||||
.setDescription('Specify a game to view stats for')
|
||||
.setRequired(false)),
|
||||
// Add more commands here
|
||||
];
|
||||
|
||||
@@ -20,11 +26,11 @@ const rest = new REST({ version: '10' }).setToken(process.env.BOT_TOKEN);
|
||||
(async () => {
|
||||
try {
|
||||
console.log('Started refreshing application (/) commands.');
|
||||
console.log('Commands to be deployed:', commands);
|
||||
console.log('Commands to be deployed:', commands.map(cmd => cmd.name));
|
||||
|
||||
await rest.put(
|
||||
Routes.applicationCommands(process.env.CLIENT_ID),
|
||||
{ body: commands },
|
||||
{ body: commands.map(command => command.toJSON()) },
|
||||
);
|
||||
|
||||
console.log('Successfully reloaded application (/) commands.');
|
||||
|
||||
Reference in New Issue
Block a user