Socket
Socket
Sign inDemoInstall

@notenoughupdates/discord-akairo

Package Overview
Dependencies
Maintainers
1
Versions
140
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@notenoughupdates/discord-akairo - npm Package Compare versions

Comparing version 9.1.3-dev.1649679866.5536822 to 9.1.3-dev.1650422274.21fe21d

.yarn/cache/@discordjs-builders-npm-0.14.0-dev.1650413406-585169f-06b2b7eec7-30fd6e8bff.zip

10

dist/package.json
{
"name": "@notenoughupdates/discord-akairo",
"version": "9.1.3-dev.1649679866.5536822",
"version": "9.1.3-dev.1650422274.21fe21d",
"description": "A highly customizable bot framework for Discord.js.",

@@ -41,7 +41,7 @@ "main": "./dist/src/index.js",

"@favware/npm-deprecate": "^1.0.4",
"@types/node": "^17.0.23",
"@typescript-eslint/eslint-plugin": "^5.18.0",
"@typescript-eslint/parser": "^5.18.0",
"@types/node": "^17.0.25",
"@typescript-eslint/eslint-plugin": "^5.20.0",
"@typescript-eslint/parser": "^5.20.0",
"copyfiles": "^2.4.1",
"discord-api-types": "0.31.0",
"discord-api-types": "0.31.2",
"discord.js": "npm:@notenoughupdates/discord.js@dev",

@@ -48,0 +48,0 @@ "eslint": "^8.13.0",

/// <reference types="node" />
import { APIEmbed } from "discord-api-types/v10";
import { BufferResolvable, Collection, EmbedBuilder, EmbedData, Emoji, Guild, GuildChannel, GuildMember, MessageAttachment, PermissionsString, Role, Snowflake, ThreadChannel, User } from "discord.js";
import { Attachment, BufferResolvable, Collection, EmbedBuilder, EmbedData, Emoji, Guild, GuildChannel, GuildMember, PermissionsString, Role, Snowflake, ThreadChannel, User } from "discord.js";
import type { Stream } from "stream";

@@ -19,7 +19,7 @@ import type { AkairoClient } from "./AkairoClient.js";

/**
* Makes a MessageAttachment.
* Makes a Attachment.
* @param file - The file.
* @param name - The filename.
*/
attachment(file: BufferResolvable | Stream, name?: string): MessageAttachment;
attachment(file: BufferResolvable | Stream, name?: string): Attachment;
/**

@@ -26,0 +26,0 @@ * Checks if a string could be referring to a channel.

@@ -16,3 +16,3 @@ "use strict";

/**
* Makes a MessageAttachment.
* Makes a Attachment.
* @param file - The file.

@@ -22,3 +22,3 @@ * @param name - The filename.

attachment(file, name) {
return new discord_js_1.MessageAttachment(file, name);
return new discord_js_1.Attachment(file, name);
}

@@ -25,0 +25,0 @@ /**

/// <reference types="node" />
import type { BaseGuildVoiceChannel, CategoryChannel, Collection, Emoji, Guild, GuildBasedChannel, GuildChannel, GuildEmoji, GuildMember, Invite, Message, MessageOptions, MessagePayload, NewsChannel, Role, StageChannel, TextChannel, ThreadChannel, User, VoiceChannel } from "discord.js";
import type { BaseGuildVoiceChannel, CategoryChannel, Collection, DirectoryChannel, Emoji, Guild, GuildBasedChannel, GuildChannel, GuildEmoji, GuildMember, Invite, Message, MessageOptions, MessagePayload, NewsChannel, Role, StageChannel, TextChannel, ThreadChannel, User, VoiceChannel } from "discord.js";
import type { URL } from "url";

@@ -471,2 +471,3 @@ import type { AkairoClient } from "../../AkairoClient.js";

* - `threadChannel` tries to resolve a thread channel.
* - `directoryChannel` tries to resolve to a directory channel.
* - `role` tries to resolve to a role.

@@ -519,2 +520,4 @@ * - `emoji` tries to resolve to a custom emoji.

threadChannels: Collection<string, ThreadChannel> | null;
directoryChannel: DirectoryChannel | null;
directoryChannels: Collection<string, DirectoryChannel> | null;
role: Role | null;

@@ -521,0 +524,0 @@ roles: Collection<string, Role> | null;

@@ -175,3 +175,3 @@ "use strict";

const channel = this.client.util.resolveChannel(phrase, message.guild.channels.cache);
if (!channel || !channel.isText())
if (!channel?.isText())
return null;

@@ -197,3 +197,3 @@ return channel;

const channel = this.client.util.resolveChannel(phrase, message.guild.channels.cache);
if (!channel || !channel.isVoice())
if (!channel?.isVoice())
return null;

@@ -219,3 +219,3 @@ return channel;

const channel = this.client.util.resolveChannel(phrase, message.guild.channels.cache);
if (!channel || !channel.isCategory())
if (!channel?.isCategory())
return null;

@@ -241,3 +241,3 @@ return channel;

const channel = this.client.util.resolveChannel(phrase, message.guild.channels.cache);
if (!channel || !channel.isNews())
if (!channel?.isNews())
return null;

@@ -263,3 +263,3 @@ return channel;

const channel = this.client.util.resolveChannel(phrase, message.guild.channels.cache);
if (!channel || !channel.isStage())
if (!channel?.isStage())
return null;

@@ -285,3 +285,3 @@ return channel;

const channel = this.client.util.resolveChannel(phrase, message.guild.channels.cache);
if (!channel || !channel.isThread())
if (!channel?.isThread())
return null;

@@ -301,2 +301,23 @@ return channel;

},
[Constants_js_1.ArgumentTypes.DIRECTORY_CHANNEL]: (message, phrase) => {
if (!phrase)
return null;
if (!message.inGuild())
return null;
const channel = this.client.util.resolveChannel(phrase, message.guild.channels.cache);
if (!channel?.isDirectory())
return null;
return channel;
},
[Constants_js_1.ArgumentTypes.DIRECTORY_CHANNELS]: (message, phrase) => {
if (!phrase)
return null;
if (!message.inGuild())
return null;
const channels = this.client.util.resolveChannels(phrase, message.guild.channels.cache);
if (!channels.size)
return null;
const directoryChannels = channels.filter(c => c.isDirectory());
return directoryChannels.size ? directoryChannels : null;
},
[Constants_js_1.ArgumentTypes.ROLE]: (message, phrase) => {

@@ -303,0 +324,0 @@ if (!phrase)

@@ -1,2 +0,2 @@

import { ApplicationCommandAutocompleteOption, ApplicationCommandChannelOptionData, ApplicationCommandChoicesData, ApplicationCommandNonOptionsData, ApplicationCommandNumericOptionData, ApplicationCommandPermissionData, ApplicationCommandSubCommandData, ApplicationCommandSubGroupData, AutocompleteInteraction, Guild, Message, PermissionResolvable, Snowflake } from "discord.js";
import { ApplicationCommandAutocompleteOption, ApplicationCommandChannelOptionData, ApplicationCommandChoicesData, ApplicationCommandNonOptionsData, ApplicationCommandNumericOptionData, ApplicationCommandPermissionData, ApplicationCommandSubCommandData, ApplicationCommandSubGroupData, AutocompleteInteraction, Guild, LocalizationMap, Message, PermissionResolvable, Snowflake } from "discord.js";
import type { AkairoMessage } from "../../util/AkairoMessage.js";

@@ -84,2 +84,6 @@ import type { Category } from "../../util/Category.js";

/**
* The slash command localizations.
*/
localization: CommandLocalization;
/**
* The key supplier for the locker.

@@ -289,2 +293,6 @@ */

/**
* The slash command localizations.
*/
localization?: CommandLocalization;
/**
* The key type or key generator for the locker. If lock is a string, it's expected one of 'guild', 'channel', or 'user'

@@ -482,2 +490,16 @@ */

/**
* The localization for slash commands.
*
* @example
* const localization = {
* nameLocalizations: {
* ["en-US"]: "command name",
* },
* descriptionLocalizations: {
* ["en-US"]: "command description",
* },
* }
*/
export declare type CommandLocalization = Record<"nameLocalizations" | "descriptionLocalizations", LocalizationMap>;
/**
* @typedef {ApplicationCommandOptionType} VSCodePleaseStopRemovingMyImports

@@ -484,0 +506,0 @@ * @internal

@@ -21,3 +21,3 @@ "use strict";

super(id, { category: options?.category });
const { aliases = [], args = this._args || this.args || [], argumentDefaults = {}, before = this.before || (() => undefined), channel = null, clientPermissions = this.clientPermissions, condition = this.condition || (() => false), cooldown = null, description = "", editable = true, flags = [], ignoreCooldown, ignorePermissions, lock, onlyNsfw = false, optionFlags = [], ownerOnly = false, prefix = this.prefix, quoted = true, ratelimit = 1, regex = this.regex, separator, slash = false, slashDefaultPermission, slashEphemeral = false, slashGuilds = [], slashOnly = false, slashOptions, slashPermissions, superUserOnly = false, typing = false, userPermissions = this.userPermissions } = options ?? {};
const { aliases = [], args = this._args || this.args || [], argumentDefaults = {}, before = this.before || (() => undefined), channel = null, clientPermissions = this.clientPermissions, condition = this.condition || (() => false), cooldown = null, description = "", editable = true, flags = [], ignoreCooldown, ignorePermissions, localization = {}, lock, onlyNsfw = false, optionFlags = [], ownerOnly = false, prefix = this.prefix, quoted = true, ratelimit = 1, regex = this.regex, separator, slash = false, slashDefaultPermission, slashEphemeral = false, slashGuilds = [], slashOnly = false, slashOptions, slashPermissions, superUserOnly = false, typing = false, userPermissions = this.userPermissions } = options ?? {};
if (!Util_js_1.Util.isArrayOf(aliases, "string"))

@@ -45,2 +45,4 @@ throw new TypeError("options.aliases must be an array of strings.");

throw new TypeError("options.ignorePermissions must be a string, function, or array of strings.");
if (typeof localization !== "object")
throw new TypeError("options.localization must be an object.");
if (lock !== undefined && typeof lock !== "function" && !["channel", "guild", "user"].includes(lock))

@@ -105,2 +107,3 @@ throw new TypeError("options.lock must be a function or a string with a value of 'channel', 'guild', or 'user'.");

this.lock = lock;
this.localization = localization;
this.onlyNsfw = Boolean(onlyNsfw);

@@ -107,0 +110,0 @@ this.ownerOnly = Boolean(ownerOnly);

@@ -202,3 +202,5 @@ "use strict";

defaultPermission: data.slashDefaultPermission,
type: discord_js_1.ApplicationCommandType.ChatInput
type: discord_js_1.ApplicationCommandType.ChatInput,
nameLocalizations: data.localization.nameLocalizations,
descriptionLocalizations: data.localization.descriptionLocalizations
});

@@ -219,3 +221,4 @@ }

defaultPermission: this.useSlashPermissions ? !(data.ownerOnly || /* data.superUserOnly || */ false) : true,
type: data.type
type: data.type,
nameLocalizations: data.nameLocalizations
});

@@ -232,3 +235,5 @@ }

defaultPermission: options.defaultPermission,
type: options.type
type: options.type,
nameLocalizations: options.nameLocalizations,
descriptionLocalizations: options.type === discord_js_1.ApplicationCommandType.ChatInput ? options.descriptionLocalizations : undefined
}))

@@ -243,8 +248,10 @@ .sort((a, b) => {

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
.map(options => ({
name: options.name,
description: options.description,
options: options.options,
defaultPermission: options.defaultPermission,
type: options.type,
nameLocalizations: options.nameLocalizations,
descriptionLocalizations: options.type === discord_js_1.ApplicationCommandType.ChatInput ? options.descriptionLocalizations : undefined
}))

@@ -280,3 +287,5 @@ .sort((a, b) => {

defaultPermission: options.defaultPermission,
type: options.type
type: options.type,
nameLocalizations: options.nameLocalizations,
descriptionLocalizations: options.type === discord_js_1.ApplicationCommandType.ChatInput ? options.descriptionLocalizations : undefined
}

@@ -299,8 +308,10 @@ ]);

const currentGuildCommands = (await guild.commands.fetch())
.map(value1 => ({
name: value1.name,
description: value1.description,
options: value1.options,
defaultPermission: value1.defaultPermission,
type: value1.type
.map(options => ({
name: options.name,
description: options.description,
options: options.options,
defaultPermission: options.defaultPermission,
type: options.type,
nameLocalizations: options.nameLocalizations,
descriptionLocalizations: options.type === discord_js_1.ApplicationCommandType.ChatInput ? options.descriptionLocalizations : undefined
}))

@@ -307,0 +318,0 @@ .sort((a, b) => {

@@ -1,2 +0,2 @@

import { ApplicationCommandType, type ContextMenuCommandInteraction, type Snowflake } from "discord.js";
import { ApplicationCommandType, LocalizationMap, type ContextMenuCommandInteraction, type Snowflake } from "discord.js";
import type { Category } from "../../util/Category.js";

@@ -47,2 +47,6 @@ import type { AkairoClient } from "../AkairoClient.js";

/**
* Name localization.
*/
nameLocalizations?: LocalizationMap;
/**
* @param id - Listener ID.

@@ -92,3 +96,7 @@ * @param options - Options for the context menu command.

type: ApplicationCommandType.User | ApplicationCommandType.Message;
/**
* Name localization.
*/
nameLocalizations?: LocalizationMap;
}
//# sourceMappingURL=ContextMenuCommand.d.ts.map

@@ -18,3 +18,3 @@ "use strict";

constructor(id, options) {
const { category, guilds, name, ownerOnly, superUserOnly, type } = options;
const { category, guilds, name, ownerOnly, superUserOnly, type, nameLocalizations } = options;
if (category !== undefined && typeof category !== "string")

@@ -30,2 +30,4 @@ throw new TypeError("options.category must be a string.");

throw new TypeError("options.type must be either ApplicationCommandType.User or ApplicationCommandType.Message.");
if (nameLocalizations !== undefined && typeof nameLocalizations !== "object")
throw new TypeError("options.nameLocalizations must be a object.");
super(id, { category });

@@ -37,2 +39,3 @@ this.guilds = guilds;

this.type = type;
this.nameLocalizations = nameLocalizations;
}

@@ -39,0 +42,0 @@ /**

@@ -44,2 +44,4 @@ export declare enum ArgumentMatches {

THREAD_CHANNELS = "threadChannels",
DIRECTORY_CHANNEL = "directoryChannel",
DIRECTORY_CHANNELS = "directoryChannels",
ROLE = "role",

@@ -46,0 +48,0 @@ ROLES = "roles",

@@ -49,2 +49,4 @@ "use strict";

ArgumentTypes["THREAD_CHANNELS"] = "threadChannels";
ArgumentTypes["DIRECTORY_CHANNEL"] = "directoryChannel";
ArgumentTypes["DIRECTORY_CHANNELS"] = "directoryChannels";
ArgumentTypes["ROLE"] = "role";

@@ -51,0 +53,0 @@ ArgumentTypes["ROLES"] = "roles";

{
"name": "@notenoughupdates/discord-akairo",
"version": "9.1.3-dev.1649679866.5536822",
"version": "9.1.3-dev.1650422274.21fe21d",
"description": "A highly customizable bot framework for Discord.js.",

@@ -41,7 +41,7 @@ "main": "./dist/src/index.js",

"@favware/npm-deprecate": "^1.0.4",
"@types/node": "^17.0.23",
"@typescript-eslint/eslint-plugin": "^5.18.0",
"@typescript-eslint/parser": "^5.18.0",
"@types/node": "^17.0.25",
"@typescript-eslint/eslint-plugin": "^5.20.0",
"@typescript-eslint/parser": "^5.20.0",
"copyfiles": "^2.4.1",
"discord-api-types": "0.31.0",
"discord-api-types": "0.31.2",
"discord.js": "npm:@notenoughupdates/discord.js@dev",

@@ -48,0 +48,0 @@ "eslint": "^8.13.0",

@@ -20,3 +20,3 @@ <!-- markdownlint-disable MD041 MD033 MD001 MD026 -->

Please see [this file](/docs/general/updates.md) for a list of changes in this fork vs normal akairo.
Please see [this file](/guide/general/updates.md) for a list of changes in this fork vs normal akairo.
If you have any questions related to this fork please contact `IRONM00N#0001` in the akairo server or join my [bot's discord](https://discord.gg/7FpsYp2c47).

@@ -23,0 +23,0 @@

import { APIEmbed } from "discord-api-types/v10";
import {
ActivityType,
Attachment,
BufferResolvable,

@@ -12,3 +13,2 @@ Collection,

GuildMember,
MessageAttachment,
PermissionFlagsBits,

@@ -41,8 +41,8 @@ PermissionsString,

/**
* Makes a MessageAttachment.
* Makes a Attachment.
* @param file - The file.
* @param name - The filename.
*/
public attachment(file: BufferResolvable | Stream, name?: string): MessageAttachment {
return new MessageAttachment(file, name);
public attachment(file: BufferResolvable | Stream, name?: string): Attachment {
return new Attachment(file, name);
}

@@ -49,0 +49,0 @@

@@ -5,2 +5,3 @@ import type {

Collection,
DirectoryChannel,
Emoji,

@@ -993,2 +994,3 @@ Guild,

* - `threadChannel` tries to resolve a thread channel.
* - `directoryChannel` tries to resolve to a directory channel.
* - `role` tries to resolve to a role.

@@ -1041,2 +1043,4 @@ * - `emoji` tries to resolve to a custom emoji.

threadChannels: Collection<string, ThreadChannel> | null;
directoryChannel: DirectoryChannel | null;
directoryChannels: Collection<string, DirectoryChannel> | null;
role: Role | null;

@@ -1043,0 +1047,0 @@ roles: Collection<string, Role> | null;

import {
CategoryChannel,
Collection,
DirectoryChannel,
DMChannel,

@@ -232,3 +233,3 @@ GuildMember,

const channel = this.client.util.resolveChannel(phrase, message.guild.channels.cache);
if (!channel || !channel.isText()) return null;
if (!channel?.isText()) return null;

@@ -252,3 +253,3 @@ return channel;

const channel = this.client.util.resolveChannel(phrase, message.guild.channels.cache);
if (!channel || !channel.isVoice()) return null;
if (!channel?.isVoice()) return null;
return channel;

@@ -271,3 +272,3 @@ },

const channel = this.client.util.resolveChannel(phrase, message.guild.channels.cache);
if (!channel || !channel.isCategory()) return null;
if (!channel?.isCategory()) return null;

@@ -291,3 +292,3 @@ return channel;

const channel = this.client.util.resolveChannel(phrase, message.guild.channels.cache);
if (!channel || !channel.isNews()) return null;
if (!channel?.isNews()) return null;

@@ -311,3 +312,3 @@ return channel;

const channel = this.client.util.resolveChannel(phrase, message.guild.channels.cache);
if (!channel || !channel.isStage()) return null;
if (!channel?.isStage()) return null;

@@ -331,3 +332,3 @@ return channel;

const channel = this.client.util.resolveChannel(phrase, message.guild.channels.cache);
if (!channel || !channel.isThread()) return null;
if (!channel?.isThread()) return null;

@@ -347,2 +348,21 @@ return channel;

[ArgumentTypes.DIRECTORY_CHANNEL]: (message, phrase) => {
if (!phrase) return null;
if (!message.inGuild()) return null;
const channel = this.client.util.resolveChannel(phrase, message.guild.channels.cache);
if (!channel?.isDirectory()) return null;
return channel;
},
[ArgumentTypes.DIRECTORY_CHANNELS]: (message, phrase) => {
if (!phrase) return null;
if (!message.inGuild()) return null;
const channels = this.client.util.resolveChannels(phrase, message.guild.channels.cache);
if (!channels.size) return null;
const directoryChannels = <Collection<string, DirectoryChannel>>channels.filter(c => c.isDirectory());
return directoryChannels.size ? directoryChannels : null;
},
[ArgumentTypes.ROLE]: (message, phrase) => {

@@ -349,0 +369,0 @@ if (!phrase) return null;

@@ -14,2 +14,3 @@ /* eslint-disable func-names, @typescript-eslint/no-unused-vars */

Guild,
LocalizationMap,
Message,

@@ -121,2 +122,7 @@ PermissionResolvable,

/**
* The slash command localizations.
*/
public declare localization: CommandLocalization;
/**
* The key supplier for the locker.

@@ -240,2 +246,3 @@ */

ignorePermissions,
localization = {},
lock,

@@ -277,2 +284,3 @@ onlyNsfw = false,

throw new TypeError("options.ignorePermissions must be a string, function, or array of strings.");
if (typeof localization !== "object") throw new TypeError("options.localization must be an object.");
if (lock !== undefined && typeof lock !== "function" && !(["channel", "guild", "user"] as const).includes(lock))

@@ -326,2 +334,3 @@ throw new TypeError("options.lock must be a function or a string with a value of 'channel', 'guild', or 'user'.");

this.lock = lock;
this.localization = <CommandLocalization>localization;
this.onlyNsfw = Boolean(onlyNsfw);

@@ -509,2 +518,7 @@ this.ownerOnly = Boolean(ownerOnly);

/**
* The slash command localizations.
*/
localization?: CommandLocalization;
/**
* The key type or key generator for the locker. If lock is a string, it's expected one of 'guild', 'channel', or 'user'

@@ -755,4 +769,19 @@ */

/**
* The localization for slash commands.
*
* @example
* const localization = {
* nameLocalizations: {
* ["en-US"]: "command name",
* },
* descriptionLocalizations: {
* ["en-US"]: "command description",
* },
* }
*/
export type CommandLocalization = Record<"nameLocalizations" | "descriptionLocalizations", LocalizationMap>;
/**
* @typedef {ApplicationCommandOptionType} VSCodePleaseStopRemovingMyImports
* @internal
*/

@@ -420,3 +420,5 @@ import {

defaultPermission: data.slashDefaultPermission,
type: ApplicationCommandType.ChatInput
type: ApplicationCommandType.ChatInput,
nameLocalizations: data.localization.nameLocalizations,
descriptionLocalizations: data.localization.descriptionLocalizations
});

@@ -438,3 +440,4 @@ }

defaultPermission: this.useSlashPermissions ? !(data.ownerOnly || /* data.superUserOnly || */ false) : true,
type: data.type
type: data.type,
nameLocalizations: data.nameLocalizations
});

@@ -452,3 +455,5 @@ }

defaultPermission: options.defaultPermission,
type: options.type
type: options.type,
nameLocalizations: options.nameLocalizations,
descriptionLocalizations: options.type === ApplicationCommandType.ChatInput ? options.descriptionLocalizations : undefined
}))

@@ -461,8 +466,10 @@ .sort((a, b) => {

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
.map(options => ({
name: options.name,
description: options.description,
options: options.options,
defaultPermission: options.defaultPermission,
type: options.type,
nameLocalizations: options.nameLocalizations,
descriptionLocalizations: options.type === ApplicationCommandType.ChatInput ? options.descriptionLocalizations : undefined
}))

@@ -495,3 +502,6 @@ .sort((a, b) => {

defaultPermission: options.defaultPermission,
type: options.type
type: options.type,
nameLocalizations: options.nameLocalizations,
descriptionLocalizations:
options.type === ApplicationCommandType.ChatInput ? options.descriptionLocalizations : undefined
} as ApplicationCommandData

@@ -514,8 +524,11 @@ ]);

const currentGuildCommands = (await guild.commands.fetch())
.map(value1 => ({
name: value1.name,
description: value1.description,
options: value1.options,
defaultPermission: value1.defaultPermission,
type: value1.type
.map(options => ({
name: options.name,
description: options.description,
options: options.options,
defaultPermission: options.defaultPermission,
type: options.type,
nameLocalizations: options.nameLocalizations,
descriptionLocalizations:
options.type === ApplicationCommandType.ChatInput ? options.descriptionLocalizations : undefined
}))

@@ -522,0 +535,0 @@ .sort((a, b) => {

/* eslint-disable func-names, @typescript-eslint/no-unused-vars */
import { ApplicationCommandType, type ContextMenuCommandInteraction, type Snowflake } from "discord.js";
import { ApplicationCommandType, LocalizationMap, type ContextMenuCommandInteraction, type Snowflake } from "discord.js";
import { AkairoError } from "../../util/AkairoError.js";

@@ -60,2 +60,7 @@ import type { Category } from "../../util/Category.js";

/**
* Name localization.
*/
public declare nameLocalizations?: LocalizationMap;
/**
* @param id - Listener ID.

@@ -65,3 +70,3 @@ * @param options - Options for the context menu command.

public constructor(id: string, options: ContextMenuCommandOptions) {
const { category, guilds, name, ownerOnly, superUserOnly, type } = options;
const { category, guilds, name, ownerOnly, superUserOnly, type, nameLocalizations } = options;

@@ -75,2 +80,4 @@ if (category !== undefined && typeof category !== "string") throw new TypeError("options.category must be a string.");

throw new TypeError("options.type must be either ApplicationCommandType.User or ApplicationCommandType.Message.");
if (nameLocalizations !== undefined && typeof nameLocalizations !== "object")
throw new TypeError("options.nameLocalizations must be a object.");

@@ -84,2 +91,3 @@ super(id, { category });

this.type = type;
this.nameLocalizations = nameLocalizations;
}

@@ -136,2 +144,7 @@

type: ApplicationCommandType.User | ApplicationCommandType.Message;
/**
* Name localization.
*/
nameLocalizations?: LocalizationMap;
}

@@ -45,2 +45,4 @@ export enum ArgumentMatches {

THREAD_CHANNELS = "threadChannels",
DIRECTORY_CHANNEL = "directoryChannel",
DIRECTORY_CHANNELS = "directoryChannels",
ROLE = "role",

@@ -47,0 +49,0 @@ ROLES = "roles",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc