Add boilerplate
This commit is contained in:
17
unregisterCommands.js
Normal file
17
unregisterCommands.js
Normal file
@@ -0,0 +1,17 @@
|
||||
'use strict';
|
||||
|
||||
const path = require('path');
|
||||
|
||||
const { Routes } = require('discord.js');
|
||||
const { REST } = require('@discordjs/rest');
|
||||
|
||||
const config = require(path.join(__dirname, 'config', 'config.json'));
|
||||
|
||||
module.exports = () => {
|
||||
const rest = new REST({ version: '10' }).setToken(config.clientToken);
|
||||
|
||||
return rest.put(Routes.applicationCommands(config.clientId), { body: [] });
|
||||
};
|
||||
|
||||
if (require.main === module)
|
||||
module.exports();
|
||||
Reference in New Issue
Block a user