Initial Commit

This commit is contained in:
2025-06-29 20:29:31 -04:00
commit 480f541898
6 changed files with 299 additions and 0 deletions

21
sync-commands.ts Normal file
View File

@@ -0,0 +1,21 @@
const { REST, Routes } = require("discord.js");
const { appId, guildId, token } = require("./config.json");
const commands = [require("./commands/calendar/ping.js").data.toJSON()];
const rest = new REST().setToken(token);
(async () => {
try {
console.log(`Started refreshing ${commands.length} slash commands`);
const data = await rest.put(
Routes.applicationGuildCommands(appId, guildId),
{
body: commands,
},
);
console.log(`Successfully reloaded ${data.length} slash commands`);
} catch (error) {
console.error(error);
}
})();