require('dotenv').config();
const { REST, Routes } = require('discord.js')
const commands = [
{
name: 'rps',
description: '가위바위보 한 판 뜨자'
},
];
const rest = new REST({ version: '10' }).setToken(process.env.TOKEN);
(async () => {
try {
console.log('registering slash command...')
await rest.put(
Routes.applicationGuildCommand(process.env.CLIENT_ID, process.env.GUILD_ID),
{ body: commands }
)
console.log('slash command were registerd sucessfully')
} catch (error) {
console.log(`There was an error, ${error}`);
}
})();
require('dotenv').config();
const { REST, Routes } = require('discord.js')
const commands = [
{
name: 'rps',
description: '가위바위보 한 판 뜨자'
},
];
const rest = new REST({ version: '10' }).setToken(process.env.TOKEN);
(async () => {
try {
console.log('registering slash command...')
await rest.put(
Routes.applicationGuildCommand(process.env.CLIENT_ID, process.env.GUILD_ID),
{ body: commands }
)
console.log('slash command were registerd sucessfully')
} catch (error) {
console.log(`There was an error, ${error}`);
}
})();