File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -65,14 +65,16 @@ module.exports.deployCommands = async function deployCommands(
6565 console . log ( `🔁 Started refreshing global and guild commands.` ) ;
6666
6767 try {
68+ const rest = new REST ( ) . setToken ( opts . token ) ;
69+
6870 const currentCommands = await rest . get ( Routes . commands ( clientId ) ) ;
6971 let currentMap = new Map ( ) ;
7072 currentCommands . forEach ( ( cmd ) => {
7173 currentMap . set ( cmd . name , cmd ) ;
7274 } ) ;
7375
7476 for ( const file of commandFiles ) {
75- const filePath = path . join ( commandsPath , file ) ;
77+ const filePath = path . join ( filePath , file ) ;
7678 const command = require ( filePath ) ;
7779 if ( ! ( "data" in command ) ) {
7880 console . error (
@@ -95,8 +97,6 @@ module.exports.deployCommands = async function deployCommands(
9597 }
9698 }
9799
98- const rest = new REST ( ) . setToken ( opts . token ) ;
99-
100100 let data ;
101101
102102 data = await rest . put ( Routes . commands ( clientId ) , { body : commands } ) ;
Original file line number Diff line number Diff line change 11{
22 "name" : " djs-command-helper" ,
3- "version" : " 2.0.1 " ,
3+ "version" : " 2.0.2 " ,
44 "description" : " A simple, easy to use module that houses functions to can refresh global and guild specific commands for your Discord App." ,
55 "main" : " ./index.js" ,
66 "scripts" : { },
You can’t perform that action at this time.
0 commit comments