Skip to content

Commit

Permalink
Use info level on the load command instead of warning
Browse files Browse the repository at this point in the history
  • Loading branch information
shimizudev committed Oct 1, 2023
1 parent 6ec5560 commit 5be8bac
Showing 1 changed file with 22 additions and 14 deletions.
36 changes: 22 additions & 14 deletions src/handlers/deploy.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,32 @@
const { REST, Routes } = require("discord.js");
const { log } = require("../functions");
const config = require("../config");
const ExtendedClient = require('../class/ExtendedClient');
const ExtendedClient = require("../class/ExtendedClient");

/**
*
* @param {ExtendedClient} client
*
* @param {ExtendedClient} client
*/
module.exports = async (client) => {
const rest = new REST({ version: '10' }).setToken(process.env.CLIENT_TOKEN || config.client.token);
const rest = new REST({ version: "10" }).setToken(
process.env.CLIENT_TOKEN || config.client.token
);

try {
log('Started loading application commands... (this might take minutes!)', 'warn');
try {
log(
"Started loading application commands... (this might take minutes!)",
"info"
);

await rest.put(Routes.applicationCommands(process.env.CLIENT_ID || config.client.id), {
body: client.applicationcommandsArray
});
await rest.put(
Routes.applicationCommands(process.env.CLIENT_ID || config.client.id),
{
body: client.applicationcommandsArray,
}
);

log('Successfully loaded application commands to Discord API.', 'done');
} catch (e) {
log('Unable to load application commands to Discord API.', 'err');
};
};
log("Successfully loaded application commands to Discord API.", "done");
} catch (e) {
log("Unable to load application commands to Discord API.", "err");
}
};

0 comments on commit 5be8bac

Please sign in to comment.