Update bot to discord.js v13 (#125)

* Update bot to discord.js v13

* Remove debug code
This commit is contained in:
Vylpes 2022-04-14 18:01:16 +01:00 committed by GitHub
parent 2ca9a40458
commit 39c06fbc8e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 125 additions and 92 deletions

View file

@ -4,7 +4,7 @@ import { ICommandContext } from "../../contracts/ICommandContext";
export default class ErrorEmbed extends MessageEmbed {
public context: ICommandContext;
constructor(context: ICommandContext, message: String) {
constructor(context: ICommandContext, message: string) {
super();
super.setColor(0xd52803);
@ -14,6 +14,6 @@ export default class ErrorEmbed extends MessageEmbed {
}
public SendToCurrentChannel() {
this.context.message.channel.send(this);
this.context.message.channel.send({ embeds: [ this ]});
}
}

View file

@ -23,7 +23,7 @@ export default class EventEmbed extends MessageEmbed {
}
}
public AddReason(message: String) {
public AddReason(message: string) {
this.addField("Reason", message || "*none*");
}
@ -37,7 +37,7 @@ export default class EventEmbed extends MessageEmbed {
return;
}
channel.send(this);
channel.send({embeds: [ this ]});
}
public async SendToMessageLogsChannel() {

View file

@ -25,13 +25,13 @@ export default class LogEmbed extends MessageEmbed {
}
}
public AddReason(message: String) {
public AddReason(message: string) {
this.addField("Reason", message || "*none*");
}
// Send methods
public SendToCurrentChannel() {
this.context.message.channel.send(this);
this.context.message.channel.send({ embeds: [ this ]});
}
public SendToChannel(name: string) {
@ -44,7 +44,7 @@ export default class LogEmbed extends MessageEmbed {
return;
}
channel.send(this);
channel.send({ embeds: [ this ]});
}
public async SendToMessageLogsChannel() {

View file

@ -15,12 +15,12 @@ export default class PublicEmbed extends MessageEmbed {
}
// Detail methods
public AddReason(message: String) {
public AddReason(message: string) {
this.addField("Reason", message || "*none*");
}
// Send methods
public SendToCurrentChannel() {
this.context.message.channel.send(this);
this.context.message.channel.send({ embeds: [ this ]});
}
}