Skip to content

Commit

Permalink
Merge pull request #13 from DeathVenom54/dev
Browse files Browse the repository at this point in the history
v1.3.2
  • Loading branch information
0xDevansh authored Jul 18, 2022
2 parents a4a237e + 8fe21d0 commit 7102e4e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "djs-marshal",
"description": "A simple slash command manager for typescript",
"version": "1.3.1",
"version": "1.3.2",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"repository": "https://github.com/DeathVenom54/djs-marshal.git",
Expand Down
4 changes: 2 additions & 2 deletions src/core/commands/syncCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const setPermissions = async (registered: ApplicationCommand, command: SlashComm
const syncGlobalCommands = async (application: ClientApplication, newCommands: SlashCommand[]): Promise<void> => {
logVerbose('Syncing global commands', application.client);
const currentCommands = await application.commands.fetch();
const cc = currentCommands.map((c) => toApplicationCommand(c));
const cc = [...currentCommands.values()];

for (const command of newCommands) {
if (!command.options?.length) command.options = [];
Expand All @@ -68,7 +68,7 @@ const syncGlobalCommands = async (application: ClientApplication, newCommands: S
// command has changed
if (!deepEqual(matching, toApplicationCommand(command))) {
logVerbose(`Syncing changed global command: ${command.name}`, application.client);
await application.commands.create(command);
await application.commands.edit(matching.id, command);
}

// finally, remove from synced commands
Expand Down

0 comments on commit 7102e4e

Please sign in to comment.