Success announcment (system message)

This commit is contained in:
mmacierzanka committed 2021-08-10 03:01:51 +02:00
1 parent 9e78438d0a
commit 4c7e295f12
5 files changed
+40 -8

No files matched your search

+13 -1
View File
@@ -10,7 +10,7 @@ import { EventEmitter } from "events";
import * as http from "http";
import { Command } from "./Command.js";
import { CommandManager } from "./CommandManager.js";
import { PermissionsError } from "./errors.js";
import { OperationSuccess, PermissionsError } from "./errors.js";
import { HelpMessage } from "./Help.js";
import { SystemMessageManager } from "./SystemMessage.js";
import {
@@ -180,6 +180,12 @@ export class Bot extends EventEmitter {
},
m
);
} else if (e instanceof OperationSuccess) {
await this.messages.system.send(
"SUCCESS",
undefined,
m
);
} else {
await this.messages.system.send(
"ERROR",
@@ -224,6 +230,12 @@ export class Bot extends EventEmitter {
},
i as CommandInteraction
);
} else if (e instanceof OperationSuccess) {
await this.messages.system.send(
"SUCCESS",
undefined,
i as CommandInteraction
);
} else {
await this.messages.system.send(
"ERROR",