Socket
Socket
Sign inDemoInstall

@notenoughupdates/discord-akairo

Package Overview
Dependencies
3
Maintainers
1
Versions
140
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 9.0.10-dev.1640800669.b25799e to 9.0.10-dev.1640801479.de050b5

2

dist/package.json
{
"name": "@notenoughupdates/discord-akairo",
"version": "9.0.10-dev.1640800669.b25799e",
"version": "9.0.10-dev.1640801479.de050b5",
"description": "A highly customizable bot framework for Discord.js.",

@@ -5,0 +5,0 @@ "main": "./dist/src/index.js",

@@ -189,4 +189,6 @@ "use strict";

type
}));
const currentGlobalCommands = (await this.client.application?.commands.fetch()).map(value1 => ({
}))
.sort((a, b) => a.name.localeCompare(b.name));
const currentGlobalCommands = (await this.client.application?.commands.fetch())
.map(value1 => ({
name: value1.name,

@@ -197,3 +199,4 @@ description: value1.description,

type: value1.type
}));
}))
.sort((a, b) => a.name.localeCompare(b.name));
if (!Util_js_1.default.deepEquals(currentGlobalCommands, slashCommandsApp)) {

@@ -225,3 +228,5 @@ this.client.emit("akairoDebug", "[registerInteractionCommands] Updating global interaction commands.", slashCommandsApp);

return;
const currentGuildCommands = (await guild.commands.fetch()).map(value1 => ({
const sortedCommands = value.sort((a, b) => a.name.localeCompare(b.name));
const currentGuildCommands = (await guild.commands.fetch())
.map(value1 => ({
name: value1.name,

@@ -232,8 +237,9 @@ description: value1.description,

type: value1.type
}));
if (!Util_js_1.default.deepEquals(currentGuildCommands, value)) {
this.client.emit("akairoDebug", `[registerInteractionCommands] Updating guild commands for ${guild.name}.`, value);
await guild.commands.set(value).catch(error => {
}))
.sort((a, b) => a.name.localeCompare(b.name));
if (!Util_js_1.default.deepEquals(currentGuildCommands, sortedCommands)) {
this.client.emit("akairoDebug", `[registerInteractionCommands] Updating guild commands for ${guild.name}.`, sortedCommands);
await guild.commands.set(sortedCommands).catch(error => {
if (error instanceof discord_js_1.DiscordAPIError)
throw new RegisterInteractionCommandError(error, "guild", value, guild);
throw new RegisterInteractionCommandError(error, "guild", sortedCommands, guild);
else

@@ -240,0 +246,0 @@ throw error;

{
"name": "@notenoughupdates/discord-akairo",
"version": "9.0.10-dev.1640800669.b25799e",
"version": "9.0.10-dev.1640801479.de050b5",
"description": "A highly customizable bot framework for Discord.js.",

@@ -5,0 +5,0 @@ "main": "./dist/src/index.js",

@@ -433,10 +433,13 @@ import {

type
}));
const currentGlobalCommands = (await this.client.application?.commands.fetch())!.map(value1 => ({
name: value1.name,
description: value1.description,
options: value1.options,
defaultPermission: value1.defaultPermission,
type: value1.type
}));
}))
.sort((a, b) => a.name.localeCompare(b.name));
const currentGlobalCommands = (await this.client.application?.commands.fetch())!
.map(value1 => ({
name: value1.name,
description: value1.description,
options: value1.options,
defaultPermission: value1.defaultPermission,
type: value1.type
}))
.sort((a, b) => a.name.localeCompare(b.name));

@@ -462,2 +465,3 @@ if (!Util.deepEquals(currentGlobalCommands, slashCommandsApp)) {

}
if (guildSlashCommandsParsed.size) {

@@ -468,14 +472,23 @@ guildSlashCommandsParsed.each(async (value, key) => {

const currentGuildCommands = (await guild.commands.fetch()).map(value1 => ({
name: value1.name,
description: value1.description,
options: value1.options,
defaultPermission: value1.defaultPermission,
type: value1.type
}));
const sortedCommands = value.sort((a, b) => a.name.localeCompare(b.name));
if (!Util.deepEquals(currentGuildCommands, value)) {
this.client.emit("akairoDebug", `[registerInteractionCommands] Updating guild commands for ${guild.name}.`, value);
await guild.commands.set(value).catch(error => {
if (error instanceof DiscordAPIError) throw new RegisterInteractionCommandError(error, "guild", value, guild);
const currentGuildCommands = (await guild.commands.fetch())
.map(value1 => ({
name: value1.name,
description: value1.description,
options: value1.options,
defaultPermission: value1.defaultPermission,
type: value1.type
}))
.sort((a, b) => a.name.localeCompare(b.name));
if (!Util.deepEquals(currentGuildCommands, sortedCommands)) {
this.client.emit(
"akairoDebug",
`[registerInteractionCommands] Updating guild commands for ${guild.name}.`,
sortedCommands
);
await guild.commands.set(sortedCommands).catch(error => {
if (error instanceof DiscordAPIError)
throw new RegisterInteractionCommandError(error, "guild", sortedCommands, guild);
else throw error;

@@ -482,0 +495,0 @@ });

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc