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.0.10-dev.1643600672.1c7b4f9 to 9.0.10-dev.1644004093.1012474

tsconfig.eslint.json

7

dist/package.json
{
"name": "@notenoughupdates/discord-akairo",
"version": "9.0.10-dev.1643600672.1c7b4f9",
"version": "9.0.10-dev.1644004093.1012474",
"description": "A highly customizable bot framework for Discord.js.",

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

},
"dependencies": {
"source-map-support": "^0.5.21"
},
"dependencies": {},
"devDependencies": {

@@ -47,3 +45,2 @@ "@discordjs/voice": "^0.7.5",

"@types/node": "^17.0.10",
"@types/source-map-support": "^0.5.4",
"@typescript-eslint/eslint-plugin": "^5.10.0",

@@ -50,0 +47,0 @@ "@typescript-eslint/parser": "^5.10.0",

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

import "source-map-support/register";
import AkairoClient, { AkairoOptions } from "./struct/AkairoClient";

@@ -3,0 +2,0 @@ import AkairoHandler, { AkairoHandlerOptions, LoadPredicate } from "./struct/AkairoHandler";

@@ -26,3 +26,2 @@ "use strict";

exports.version = exports.Util = exports.TypeResolver = exports.TaskHandler = exports.Task = exports.RegisterInteractionCommandError = exports.ListenerHandler = exports.Listener = exports.InhibitorHandler = exports.Inhibitor = exports.Flag = exports.ContextMenuCommandHandler = exports.ContextMenuCommand = exports.ContentParser = exports.Constants = exports.CommandUtil = exports.CommandHandler = exports.Command = exports.ClientUtil = exports.Category = exports.ArgumentRunner = exports.Argument = exports.AkairoModule = exports.AkairoMessage = exports.AkairoHandler = exports.AkairoError = exports.AkairoClient = void 0;
require("source-map-support/register");
const package_json_1 = __importDefault(require("../package.json"));

@@ -29,0 +28,0 @@ const AkairoClient_1 = __importDefault(require("./struct/AkairoClient"));

@@ -552,5 +552,2 @@ /// <reference types="node" />

export declare type PrefixSupplier = (message: Message) => string | string[] | Promise<string | string[]>;
/**
* Calls the corresponding get function on the {@link CommandInteractionOptionResolver}
*/
declare const slashResolvable: readonly ["Boolean", "Channel", "String", "Integer", "Number", "User", "Member", "Role", "Mentionable"];

@@ -557,0 +554,0 @@ export declare type SlashResolveType = typeof slashResolvable[number];

@@ -943,11 +943,11 @@ "use strict";

}
if (command.channel === "guild" && !message.guild) {
if (command.channel === "guild" && !message.inGuild()) {
this.emit(event, message, command, Constants_js_1.BuiltInReasons.GUILD);
return true;
}
if (command.channel === "dm" && message.guild) {
if (command.channel === "dm" && message.inGuild()) {
this.emit(event, message, command, Constants_js_1.BuiltInReasons.DM);
return true;
}
if (command.onlyNsfw && !message.channel?.["nsfw"]) {
if (command.onlyNsfw && !("nsfw" in (message.channel ?? {}))) {
this.emit(event, message, command, Constants_js_1.BuiltInReasons.NOT_NSFW);

@@ -1303,6 +1303,4 @@ return true;

exports.RegisterInteractionCommandError = RegisterInteractionCommandError;
/**
* Calls the corresponding get function on the {@link CommandInteractionOptionResolver}
*/
const slashResolvable = ["Boolean", "Channel", "String", "Integer", "Number", "User", "Member", "Role", "Mentionable"];
// todo: remove this once discord-api-types updates
/**

@@ -1309,0 +1307,0 @@ * Used for reverse mapping since discord exports its enums as const enums.

@@ -17,3 +17,3 @@ <!-- markdownlint-disable MD001 -->

export default class AddCommand extends Command {
constructor() {
public constructor() {
super("add", {

@@ -24,3 +24,3 @@ aliases: ["add"]

exec(message: Message): Promise<Message> {
public override exec(message: Message): Promise<Message> {
// This doesn't work!

@@ -40,3 +40,3 @@ return message.reply(a + b + c);

export default class AddCommand extends Command {
constructor() {
public constructor() {
super("add", {

@@ -64,3 +64,3 @@ aliases: ["add"],

exec(message: Message, args: { numOne: number; numTwo: number; numThree: number }): Promise<Message> {
public override exec(message: Message, args: { numOne: number; numTwo: number; numThree: number }): Promise<Message> {
const sum = args.numOne + args.numTwo + args.numThree;

@@ -67,0 +67,0 @@ return message.reply(`The sum is ${sum}!`);

@@ -16,3 +16,3 @@ <!-- markdownlint-disable MD001 -->

export default class HighestRoleCommand extends Command {
constructor() {
public constructor() {
super("highestRole", {

@@ -31,3 +31,3 @@ aliases: ["highestRole"],

exec(message: Message, args: { member: GuildMember }): Promise<Message> {
public override exec(message: Message, args: { member: GuildMember }): Promise<Message> {
return message.reply(args.member.roles.highest.name);

@@ -51,3 +51,3 @@ }

export default class RollCommand extends Command {
constructor() {
public constructor() {
super("roll", {

@@ -65,3 +65,3 @@ aliases: ["roll"],

exec(message: Message, args: { amount: number }): Promise<Message> {
public override exec(message: Message, args: { amount: number }): Promise<Message> {
const res = Math.floor(Math.random() * args.amount);

@@ -82,3 +82,3 @@ return message.reply(`You rolled ${res}!`);

export default class RollCommand extends Command {
constructor() {
public constructor() {
super("roll", {

@@ -101,3 +101,3 @@ aliases: ["roll"],

exec(message: Message, args: { amount: number }): Promise<Message> {
public override exec(message: Message, args: { amount: number }): Promise<Message> {
const res = Math.floor(Math.random() * args.amount);

@@ -104,0 +104,0 @@ return message.reply(`You rolled ${res}!`);

@@ -19,7 +19,7 @@ <!-- markdownlint-disable MD001 MD026 -->

```ts
import { ArgumentOptions, Command, Flag } from "discord-akairo";
import { ArgumentGeneratorReturn, Command } from "discord-akairo";
import { Message } from "discord.js";
export default class GeneratorCommand extends Command {
constructor() {
public constructor() {
super("generator", {

@@ -30,7 +30,7 @@ aliases: ["generator"]

*args(): IterableIterator<ArgumentOptions | Flag> {
public override *args(): ArgumentGeneratorReturn {
// Here!
}
exec(message: Message, args) {
public override exec(message: Message, args) {
// Do whatever.

@@ -50,3 +50,3 @@ }

/* ... */
*args(): IterableIterator<ArgumentOptions | Flag> {
public override *args(): IterableIterator<ArgumentOptions | Flag> {
// Notice: no `id` necessary!

@@ -74,3 +74,3 @@ // Also notice: `yield` must be used.

/* ... */
*args(message: Message): IterableIterator<ArgumentOptions | Flag> {
public override *args(message: Message): IterableIterator<ArgumentOptions | Flag> {
const x = yield { type: "integer" };

@@ -77,0 +77,0 @@

@@ -16,3 +16,3 @@ <!-- markdownlint-disable MD001 -->

export default class PickCommand extends Command {
constructor() {
public constructor() {
super("pick", {

@@ -29,3 +29,3 @@ aliases: ["pick"],

exec(message: Message, args: { items: string }): Promise<Message> {
public override exec(message: Message, args: { items: string }): Promise<Message> {
const picked = args.items; // ???

@@ -44,3 +44,3 @@ return message.reply(`I picked ${picked}`);

export default class PickCommand extends Command {
constructor() {
public constructor() {
super("pick", {

@@ -57,3 +57,3 @@ aliases: ["pick"],

exec(message: Message, args: { items: string }): Promise<Message> {
public override exec(message: Message, args: { items: string }): Promise<Message> {
const items = args.items.split("|");

@@ -81,3 +81,3 @@ const picked = items[Math.floor(Math.random() * items.length)];

export default class StatsCommand extends Command {
constructor() {
public constructor() {
super("stats", {

@@ -98,3 +98,3 @@ aliases: ["stats"],

exec(message: Message, args: { username: string; advanced: boolean }): Promise<Message> {
public override exec(message: Message, args: { username: string; advanced: boolean }): Promise<Message> {
const user = exampleAPI.getUser(args.username);

@@ -127,3 +127,3 @@

export default class StatsCommand extends Command {
constructor() {
public constructor() {
super("stats", {

@@ -145,3 +145,3 @@ aliases: ["stats"],

exec(message: Message, args: { username: string; color: string }): Promise<Message> {
public override exec(message: Message, args: { username: string; color: string }): Promise<Message> {
const team = exampleAPI.getTeam(args.color);

@@ -183,3 +183,3 @@ const user = team.getUser(args.username);

export default class PickCommand extends Command {
constructor() {
public constructor() {
super("pick", {

@@ -198,3 +198,3 @@ aliases: ["pick"],

exec(message: Message, args: { items: number[] }): Promise<Message> {
public override exec(message: Message, args: { items: number[] }): Promise<Message> {
const picked = args.items[Math.floor(Math.random() * args.items.length)];

@@ -201,0 +201,0 @@ return message.reply(`I picked ${picked} which is ${picked % 2 === 0 ? "even" : "odd"}!`);

@@ -27,3 +27,3 @@ <!-- markdownlint-disable MD001 -->

export default class HighestRoleCommand extends Command {
constructor() {
public constructor() {
super("highestRole", {

@@ -42,3 +42,3 @@ aliases: ["highestRole"],

exec(message: Message, args: { member: GuildMember }): Promise<Message> {
public override exec(message: Message, args: { member: GuildMember }): Promise<Message> {
return message.reply(args.member.roles.highest.name);

@@ -58,3 +58,3 @@ }

export default class HighestRoleCommand extends Command {
constructor() {
public constructor() {
super("highestRole", {

@@ -76,3 +76,3 @@ aliases: ["highestRole"],

exec(message: Message, args: { member: GuildMember }): Promise<Message> {
public override exec(message: Message, args: { member: GuildMember }): Promise<Message> {
return message.reply(args.member.roles.highest.name);

@@ -145,3 +145,3 @@ }

export default class AddCommand extends Command {
constructor() {
public constructor() {
super("add", {

@@ -173,3 +173,3 @@ aliases: ["add"],

exec(message: Message, args: { numOne: number; numTwo: number; numThree: number }): Promise<Message> {
public override exec(message: Message, args: { numOne: number; numTwo: number; numThree: number }): Promise<Message> {
const sum = args.numOne + args.numTwo + args.numThree;

@@ -176,0 +176,0 @@ return message.reply(`The sum is ${sum}!`);

@@ -15,3 +15,3 @@ <!-- markdownlint-disable MD001 -->

export default class HighestRoleCommand extends Command {
constructor() {
public constructor() {
super("highestRole", {

@@ -35,3 +35,3 @@ aliases: ["highestRole"],

exec(message: Message, args: { member: GuildMember }): Promise<Message> {
public override exec(message: Message, args: { member: GuildMember }): Promise<Message> {
return message.reply(args.member.roles.highest.name);

@@ -58,3 +58,3 @@ }

export default class PickCommand extends Command {
constructor() {
public constructor() {
super("pick", {

@@ -79,3 +79,3 @@ aliases: ["pick"],

exec(message: Message, args: { items }) {
public override exec(message: Message, args: { items }) {
const picked = args.items[Math.floor(Math.random() * args.items.length)];

@@ -82,0 +82,0 @@ return message.reply(`I picked ${picked.trim()}!`);

@@ -94,3 +94,3 @@ <!-- markdownlint-disable MD001 -->

export default class PokemonCommand extends Command {
constructor() {
public constructor() {
super("pokemon", {

@@ -108,3 +108,3 @@ aliases: ["pokemon"],

exec(message: Message, args: { option: "grass" | "fire" | "water" | "electric" }): Promise<Message> {
public override exec(message: Message, args: { option: "grass" | "fire" | "water" | "electric" }): Promise<Message> {
if (args.option === "grass") return message.reply("bulbasaur");

@@ -129,3 +129,3 @@ if (args.option === "fire") return message.reply("charmander");

export default class PokemonCommand extends Command {
constructor() {
public constructor() {
super("pokemon", {

@@ -148,3 +148,3 @@ aliases: ["pokemon"],

exec(message: Message, args: { option: "grass" | "fire" | "water" | "electric" }): Promise<Message> {
public override exec(message: Message, args: { option: "grass" | "fire" | "water" | "electric" }): Promise<Message> {
if (args.option === "grass") return message.reply("bulbasaur");

@@ -170,3 +170,3 @@ if (args.option === "fire") return message.reply("charmander");

export default class AskCommand extends Command {
constructor() {
public constructor() {
super("ask", {

@@ -183,3 +183,3 @@ aliases: ["ask"],

exec(message: Message, args: { yesOrNo }) {
public override exec(message: Message, args: { yesOrNo }) {
// {

@@ -186,0 +186,0 @@ // match: [...],

@@ -15,3 +15,3 @@ <!-- markdownlint-disable MD001 MD026 -->

export default class AddRoleCommand extends Command {
constructor() {
public constructor() {
super("addrole", {

@@ -36,3 +36,3 @@ aliases: ["addrole"],

async exec(message: Message, args: { member: GuildMember; role: Role }) {
public override async exec(message: Message, args: { member: GuildMember; role: Role }) {
await args.member.roles.add(args.role);

@@ -39,0 +39,0 @@ return message.reply("Done!");

@@ -71,3 +71,3 @@ <!-- markdownlint-disable MD001 -->

export default class PingCommand extends Command {
constructor() {
public constructor() {
super("ping", {

@@ -78,3 +78,3 @@ aliases: ["ping"]

exec(message: Message): Promise<Message> {
public override exec(message: Message): Promise<Message> {
return message.reply("Pong!");

@@ -81,0 +81,0 @@ }

@@ -17,3 +17,3 @@ <!-- markdownlint-disable MD001 -->

public inhibitorHandler: InhibitorHandler;
constructor() {
public constructor() {
super({

@@ -59,3 +59,3 @@ intents: [

export default class BlacklistInhibitor extends Inhibitor {
constructor() {
public constructor() {
super("blacklist", {

@@ -66,3 +66,3 @@ reason: "blacklist"

exec(message: Message): boolean {
public override exec(message: Message): boolean {
// He's a meanie!

@@ -69,0 +69,0 @@ const blacklist = ["81440962496172032"];

@@ -114,3 +114,3 @@ <!-- markdownlint-disable MD001 MD026 -->

export default class CommandBlockedListener extends Listener {
constructor() {
public constructor() {
super("commandBlocked", {

@@ -122,3 +122,3 @@ emitter: "commandHandler",

exec(message: Message | AkairoMessage, command: Command, reason: string): void {
public override exec(message: Message | AkairoMessage, command: Command, reason: string): void {
console.log(`${message.author.username} was blocked from using ${command.id} because of ${reason}!`);

@@ -125,0 +125,0 @@ }

@@ -32,3 +32,3 @@ <!-- markdownlint-disable MD001 MD033 MD040 -->

class MyClient extends AkairoClient {
constructor() {
public constructor() {
super({

@@ -52,3 +52,3 @@ // Options for Akairo and discord.js go here.

class MyClient extends AkairoClient {
constructor() {
public constructor() {
super({

@@ -55,0 +55,0 @@ intents: [

@@ -33,3 +33,3 @@ <!-- markdownlint-disable MD001 -->

export default class HelloCommand extends Command {
constructor() {
public constructor() {
super("hello", {

@@ -40,3 +40,3 @@ aliases: ["hello"]

exec(message: Message): Promise<Message> {
public override exec(message: Message): Promise<Message> {
// Also available: util.reply()

@@ -66,3 +66,3 @@ return message.util.send("Hello!");

export default class HelloCommand extends Command {
constructor() {
public constructor() {
super("hello", {

@@ -73,3 +73,3 @@ aliases: ["hello", "hi", "konnichiha", "bonjour", "heyo"]

exec(message: Message): Promise<Message> {
public override exec(message: Message): Promise<Message> {
if (message.util.parsed.alias === "konnichiha") {

@@ -76,0 +76,0 @@ return message.util.send("こんにちは!");

@@ -19,3 +19,3 @@ <!-- markdownlint-disable MD001 -->

export default class ComplimentCommand extends Command {
constructor() {
public constructor() {
super("compliment", {

@@ -26,7 +26,7 @@ category: "random"

condition(message: Message): boolean {
public override condition(message: Message): boolean {
return message.author.id === "126485019500871680";
}
exec(message: Message): Promise<Message> {
public override exec(message: Message): Promise<Message> {
return message.reply("You are a great person!");

@@ -33,0 +33,0 @@ }

@@ -16,3 +16,3 @@ <!-- markdownlint-disable MD001 MD026 -->

export default class RequestCommand extends Command {
constructor() {
public constructor() {
super("request", {

@@ -25,3 +25,3 @@ aliases: ["request"],

async exec(message: Message): Promise<Message> {
public override async exec(message: Message): Promise<Message> {
const info = await exampleAPI.fetchInfo();

@@ -28,0 +28,0 @@ return message.reply(info);

@@ -16,3 +16,3 @@ <!-- markdownlint-disable MD001 -->

export default class BanCommand extends Command {
constructor() {
public constructor() {
super("ban", {

@@ -26,4 +26,4 @@ aliases: ["ban"],

],
clientPermissions: ["BAN_MEMBERS"],
userPermissions: ["BAN_MEMBERS"],
clientPermissions: ["BanMembers"],
userPermissions: ["BanMembers"],
channel: "guild"

@@ -33,3 +33,3 @@ });

async exec(message: Message, args: { member: GuildMember }): Promise<Message> {
public override async exec(message: Message, args: { member: GuildMember }): Promise<Message> {
if (!args.member) {

@@ -72,3 +72,3 @@ return message.reply("No member found with that name.");

],
clientPermissions: ["BAN_MEMBERS"],
clientPermissions: ["BanMembers"],
channel: "guild"

@@ -75,0 +75,0 @@ });

@@ -47,3 +47,3 @@ <!-- markdownlint-disable MD001 -->

export default class SecretCommand extends Command {
constructor() {
public constructor() {
super("secret", {

@@ -55,3 +55,3 @@ aliases: ["secret"],

exec(message: Message) {
public override exec(message: Message) {
return message.reply("Woah! How did you find this!?");

@@ -58,0 +58,0 @@ }

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

export default class AyyCommand extends Command {
constructor() {
public constructor() {
super("ayy", {

@@ -27,3 +27,3 @@ regex: /^ayy$/i

exec(message: Message): Promise<Message> {
public override exec(message: Message): Promise<Message> {
return message.reply("lmao");

@@ -47,3 +47,3 @@ }

export default class AyyCommand extends Command {
constructor() {
public constructor() {
super("ayy", {

@@ -54,3 +54,3 @@ category: "random"

regex(message: Message) {
public override regex(message: Message) {
// Do some code...

@@ -60,3 +60,3 @@ return /^ayy$/i;

exec(message: Message): Promise<Message> {
public override exec(message: Message): Promise<Message> {
return message.reply("lmao");

@@ -63,0 +63,0 @@ }

@@ -14,3 +14,3 @@ <!-- markdownlint-disable MD001 -->

export default class NicknameCommand extends Command {
constructor() {
public constructor() {
super("nickname", {

@@ -21,3 +21,3 @@ aliases: ["nickname"]

exec(message: Message): Promise<Message> {
public override exec(message: Message): Promise<Message> {
return message.reply(`Your nickname is ${message.member.nickname}.`);

@@ -35,3 +35,3 @@ }

export default class NicknameCommand extends Command {
constructor() {
public constructor() {
super("nickname", {

@@ -43,3 +43,3 @@ aliases: ["nickname"],

exec(message: Message): Promise<Message> {
public override exec(message: Message): Promise<Message> {
return message.reply(`Your nickname is ${message.member.nickname}.`);

@@ -64,3 +64,3 @@ }

export default class TokenCommand extends Command {
constructor() {
public constructor() {
super("token", {

@@ -73,3 +73,3 @@ aliases: ["token"],

exec(message: Message): Promise<Message> {
public override exec(message: Message): Promise<Message> {
// Don't actually do this.

@@ -76,0 +76,0 @@ return message.reply(this.client.token);

@@ -32,3 +32,3 @@ # Changes in this fork of akairo

import { AkairoMessage, Command } from "discord-akairo";
import { GuildMember, Message } from "discord.js";
import { ApplicationCommandOptionType, GuildMember, Message } from "discord.js";

@@ -44,3 +44,3 @@ export default class GreetCommand extends Command {

type: "member",
match: "content"
match: "rest"
}

@@ -57,3 +57,4 @@ ],

description: "The member you want to greet",
type: "USER",
type: ApplicationCommandOptionType.User,
resolve: "Member", // resolve the user to a GuildMember object
required: true

@@ -133,3 +134,4 @@ }

}
async exec() {
public override async exec() {
console.log("hello from", this.client.user.username);

@@ -179,3 +181,3 @@ }

/* ... */
constructor(config: Option) {
public constructor(config: Option) {
super({

@@ -192,3 +194,3 @@ ownerID: config.owners,

/* ... */
constructor(config: Option) {
public constructor(config: Option) {
super({

@@ -240,3 +242,3 @@ ownerID: config.owners,

export default class NsfwCommand extends Command {
constructor() {
public constructor() {
super("nsfw", {

@@ -243,0 +245,0 @@ aliases: ["nsfw"],

@@ -17,3 +17,3 @@ <!-- markdownlint-disable MD001 -->

export default class BlacklistInhibitor extends Inhibitor {
constructor() {
public constructor() {
super("blacklist", {

@@ -25,3 +25,3 @@ reason: "blacklist",

exec(message: Message): boolean {
public override exec(message: Message): boolean {
// Still a meanie!

@@ -28,0 +28,0 @@ const blacklist = ["81440962496172032"];

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

export default class GlobalBlacklistInhibitor extends Inhibitor {
constructor() {
public constructor() {
super("globalBlacklist", {

@@ -28,3 +28,3 @@ reason: "globalBlacklist",

exec(message: Message): boolean {
public override exec(message: Message): boolean {
return globalBlacklist.has(message.author.id);

@@ -31,0 +31,0 @@ }

@@ -27,3 +27,3 @@ <!-- markdownlint-disable MD001 -->

export default class UnhandledRejectionListener extends Listener {
constructor() {
public constructor() {
super("unhandledRejection", {

@@ -35,3 +35,3 @@ event: "unhandledRejection",

exec(error: Error): void {
public override exec(error: Error): void {
console.error(error);

@@ -38,0 +38,0 @@ }

@@ -16,3 +16,4 @@ <!-- markdownlint-disable MD001 -->

public color: string;
constructor(id, options = {}) {
public constructor(id, options = {}) {
super(id, options);

@@ -23,3 +24,3 @@

exec() {
public override exec() {
throw new Error("Not implemented!");

@@ -26,0 +27,0 @@ }

@@ -14,3 +14,3 @@ <!-- markdownlint-disable MD001 -->

export default class PingCommand extends Command {
constructor() {
public constructor() {
super("ping", {

@@ -22,3 +22,3 @@ aliases: ["ping"],

exec(message: Message): Promise<Message> {
public override exec(message: Message): Promise<Message> {
return message.reply("Pong!");

@@ -44,3 +44,3 @@ }

export default class ReloadCommand extends Command {
constructor() {
public constructor() {
super("reload", {

@@ -58,3 +58,3 @@ aliases: ["reload"],

exec(message: Message, args: { commandID: string }) {
public override exec(message: Message, args: { commandID: string }) {
// `this` refers to the command object.

@@ -61,0 +61,0 @@ this.handler.reload(args.commandID);

@@ -8,3 +8,3 @@ # Ping Command

export default class PingCommand extends Command {
constructor() {
public constructor() {
super("ping", {

@@ -15,3 +15,3 @@ aliases: ["ping", "hello"]

async exec(message: Message): Promise<Message> {
public override async exec(message: Message): Promise<Message> {
const sent = await message.util.reply("Pong!");

@@ -18,0 +18,0 @@ const timeDiff = (sent.editedAt || sent.createdAt) - (message.editedAt || message.createdAt);

{
"name": "@notenoughupdates/discord-akairo",
"version": "9.0.10-dev.1643600672.1c7b4f9",
"version": "9.0.10-dev.1644004093.1012474",
"description": "A highly customizable bot framework for Discord.js.",

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

},
"dependencies": {
"source-map-support": "^0.5.21"
},
"dependencies": {},
"devDependencies": {

@@ -47,3 +45,2 @@ "@discordjs/voice": "^0.7.5",

"@types/node": "^17.0.10",
"@types/source-map-support": "^0.5.4",
"@typescript-eslint/eslint-plugin": "^5.10.0",

@@ -50,0 +47,0 @@ "@typescript-eslint/parser": "^5.10.0",

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

import "source-map-support/register";
import packageJSON from "../package.json";

@@ -3,0 +2,0 @@ import AkairoClient, { AkairoOptions } from "./struct/AkairoClient";

@@ -192,3 +192,3 @@ import type {

*/
get client(): AkairoClient {
public get client(): AkairoClient {
return this.command.client;

@@ -200,3 +200,3 @@ }

*/
get handler(): CommandHandler {
public get handler(): CommandHandler {
return this.command.handler;

@@ -203,0 +203,0 @@ }

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

// eslint-disable-next-line complexity
constructor(id: string, options?: CommandOptions) {
public constructor(id: string, options?: CommandOptions) {
super(id, { category: options?.category });

@@ -224,0 +224,0 @@

@@ -22,3 +22,2 @@ import {

TextBasedChannel,
TextChannel,
User

@@ -1209,3 +1208,3 @@ } from "discord.js";

if (command.channel === "guild" && !message.guild) {
if (command.channel === "guild" && !message.inGuild()) {
this.emit(event, message, command, BuiltInReasons.GUILD);

@@ -1215,3 +1214,3 @@ return true;

if (command.channel === "dm" && message.guild) {
if (command.channel === "dm" && message.inGuild()) {
this.emit(event, message, command, BuiltInReasons.DM);

@@ -1221,3 +1220,3 @@ return true;

if (command.onlyNsfw && !(message.channel as TextChannel)?.["nsfw"]) {
if (command.onlyNsfw && !("nsfw" in (message.channel ?? {}))) {
this.emit(event, message, command, BuiltInReasons.NOT_NSFW);

@@ -1651,8 +1650,13 @@ return true;

export class RegisterInteractionCommandError extends Error {
original: DiscordAPIError;
type: "guild" | "global";
data: ApplicationCommandData[];
guild: Guild | null;
public original: DiscordAPIError;
public type: "guild" | "global";
public data: ApplicationCommandData[];
public guild: Guild | null;
constructor(original: DiscordAPIError, type: "guild" | "global", data: ApplicationCommandData[], guild: Guild | null = null) {
public constructor(
original: DiscordAPIError,
type: "guild" | "global",
data: ApplicationCommandData[],
guild: Guild | null = null
) {
super("Failed to register interaction commands.");

@@ -1866,9 +1870,8 @@ this.original = original;

const slashResolvable = ["Boolean", "Channel", "String", "Integer", "Number", "User", "Member", "Role", "Mentionable"] as const;
export type SlashResolveType = typeof slashResolvable[number];
/**
* Calls the corresponding get function on the {@link CommandInteractionOptionResolver}
*/
const slashResolvable = ["Boolean", "Channel", "String", "Integer", "Number", "User", "Member", "Role", "Mentionable"] as const;
export type SlashResolveType = typeof slashResolvable[number];
type GetFunction = `get${SlashResolveType}`;

@@ -1890,2 +1893,3 @@

// todo: remove this once discord-api-types updates
/**

@@ -1892,0 +1896,0 @@ * Used for reverse mapping since discord exports its enums as const enums.

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