minor changes and djs upgrade

This commit is contained in:
mmacierzanka committed 2021-09-05 21:28:38 +02:00
1 parent 7213ee33a6
commit 366b5ac372
5 files changed
+16 -16

No files matched your search

+1 -1
View File
@@ -29,7 +29,7 @@
"homepage": "https://github.com/GRZ4NA/CommandBot#readme",
"dependencies": {
"axios": "^0.21.1",
"discord.js": "^13.0.1"
"discord.js": "^13.1.0"
},
"devDependencies": {
"@types/node": "^15.12.4",
+2 -2
View File
@@ -158,7 +158,7 @@ export class Bot extends EventEmitter {
this.client.on("messageCreate", async (m) => {
let cmdMsg: CommandMessageStructure | null = null;
try {
cmdMsg = this.commands.fetchFromMessage(m);
cmdMsg = this.commands.fetch(m);
if (cmdMsg) {
this.emit("COMMAND", m, cmdMsg);
await cmdMsg.command.start(m, cmdMsg.parameters);
@@ -200,7 +200,7 @@ export class Bot extends EventEmitter {
let cmd: CommandMessageStructure | null = null;
try {
if (!i.isCommand()) return;
cmd = this.commands.fetchFromInteraction(i);
cmd = this.commands.fetch(i);
if (cmd) {
this.emit("COMMAND", i, cmd);
await cmd.command.start(i, cmd.parameters);
+2 -2
View File
@@ -1,6 +1,6 @@
import { ColorResolvable, GuildMember, User } from "discord.js";
import { TextCommand } from "../structures/TextCommand.js";
import { PermissionsError } from "../errors.js";
import { BaseCommand } from "../structures/BaseCommand.js";
/**
* @type Type of message
@@ -70,7 +70,7 @@ export interface SystemMessageData {
* A {@link Command} instance
* @type {TextCommand}
*/
command?: TextCommand;
command?: BaseCommand;
/**
* Phrase received from a Discord channel
+2 -2
View File
@@ -1,9 +1,9 @@
import { CommandInteraction, Message } from "discord.js";
import { ParameterSchema, ParameterResolvable } from "./Parameter.js";
import { InputParameter } from "../structures/Parameter.js";
import { TextCommand } from "../structures/TextCommand.js";
import { PermissionCheckTypes, PermissionTypes } from "./permissions.js";
import { CommandFunctionReturnTypes } from "./BaseCommand.js";
import { BaseCommand } from "../structures/BaseCommand.js";
/**
* @interface
@@ -90,7 +90,7 @@ export interface TextCommandInit {
}
export interface CommandMessageStructure {
command: TextCommand;
command: BaseCommand;
parameters: InputParameter[];
}
+9 -9
View File
@@ -2,10 +2,10 @@
# yarn lockfile v1
"@discordjs/builders@^0.4.0":
version "0.4.0"
resolved "https://registry.yarnpkg.com/@discordjs/builders/-/builders-0.4.0.tgz#bb41573ce4824aa9194a53b52c29c5219b610010"
integrity sha512-EiwLltKph6TSaPJIzJYdzNc1PnA2ZNaaE0t0ODg3ghnpVHqfgd0YX9/srsleYHW2cw1sfIq+kbM+h0etf7GWLA==
"@discordjs/builders@^0.5.0":
version "0.5.0"
resolved "https://registry.yarnpkg.com/@discordjs/builders/-/builders-0.5.0.tgz#646cbea9cc67f68639e6fb70ed1278b26dacdb14"
integrity sha512-HP5y4Rqw68o61Qv4qM5tVmDbWi4mdTFftqIOGRo33SNPpLJ1Ga3KEIR2ibKofkmsoQhEpLmopD1AZDs3cKpHuw==
dependencies:
"@sindresorhus/is" "^4.0.1"
discord-api-types "^0.22.0"
@@ -88,12 +88,12 @@ discord-api-types@^0.22.0:
resolved "https://registry.yarnpkg.com/discord-api-types/-/discord-api-types-0.22.0.tgz#34dc57fe8e016e5eaac5e393646cd42a7e1ccc2a"
integrity sha512-l8yD/2zRbZItUQpy7ZxBJwaLX/Bs2TGaCthRppk8Sw24LOIWg12t9JEreezPoYD0SQcC2htNNo27kYEpYW/Srg==
discord.js@^13.0.1:
version "13.0.1"
resolved "https://registry.yarnpkg.com/discord.js/-/discord.js-13.0.1.tgz#58f009706d1d7587fe9ff6c6c781e4540ae085f9"
integrity sha512-pEODCFfxypBnGEYpSgjkn1jt70raCS1um7Zp0AXEfW1DcR29wISzQ/WeWdnjP5KTXGi0LTtkRiUjOsMgSoukxA==
discord.js@^13.1.0:
version "13.1.0"
resolved "https://registry.yarnpkg.com/discord.js/-/discord.js-13.1.0.tgz#99f6a2a8be88d31906ff0148e9b1cb603ebb2e2e"
integrity sha512-gxO4CXKdHpqA+WKG+f5RNnd3srTDj5uFJHgOathksDE90YNq/Qijkd2WlMgTTMS6AJoEnHxI7G9eDQHCuZ+xDA==
dependencies:
"@discordjs/builders" "^0.4.0"
"@discordjs/builders" "^0.5.0"
"@discordjs/collection" "^0.2.1"
"@discordjs/form-data" "^3.0.1"
"@sapphire/async-queue" "^1.1.4"