Skip to content

Commit 45dc84c

Browse files
committed
fixed minor typerrors and undefined
1 parent a10ed40 commit 45dc84c

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ 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);
68+
const rest = new REST().setToken(opts.appToken);
6969

7070
const currentCommands = await rest.get(Routes.commands(clientId));
7171
let currentMap = new Map();
@@ -74,7 +74,7 @@ module.exports.deployCommands = async function deployCommands(
7474
});
7575

7676
for (const file of commandFiles) {
77-
const filePath = path.join(filePath, file);
77+
const filePath = path.join(folderPath, file);
7878
const command = require(filePath);
7979
if (!("data" in command)) {
8080
console.error(
@@ -83,7 +83,7 @@ module.exports.deployCommands = async function deployCommands(
8383
continue;
8484
} else if ("data" in command && Boolean(command.ignore ?? false)) {
8585
if (opts.logs)
86-
console.log(`- Command '${command.name}' is ignored!`);
86+
console.log(`- Command '${command.data.name}' is ignored!`);
8787
continue;
8888
}
8989

@@ -101,7 +101,7 @@ module.exports.deployCommands = async function deployCommands(
101101

102102
data = await rest.put(Routes.commands(clientId), { body: commands });
103103
if (opts.logs)
104-
console.log(`✅ Global commands '${data.length}' refreshed`);
104+
console.log(`✅ ${data.length} global commands refreshed`);
105105

106106
for (let cmd of privateCommands) {
107107
for (let gid of cmd.guildIds) {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "djs-command-helper",
3-
"version": "2.0.2",
3+
"version": "2.0.3",
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": { },

0 commit comments

Comments
 (0)