Get commands and events to use database

This commit is contained in:
Ethan Lane 2022-03-03 19:45:33 +00:00
parent 8b2da347b1
commit 6ca08bee78
Signed by: Vylpes
GPG key ID: EED233CC06D12504
15 changed files with 119 additions and 56 deletions

View file

@ -69,7 +69,7 @@ export default class Ban extends Command {
await targetMember.ban({ reason: `Moderator: ${context.message.author.tag}, Reason: ${reason || "*none*"}` });
logEmbed.SendToModLogsChannel();
await logEmbed.SendToModLogsChannel();
publicEmbed.SendToCurrentChannel();
return {

View file

@ -72,7 +72,7 @@ export default class Kick extends Command {
await targetMember.kick(`Moderator: ${context.message.author.tag}, Reason: ${reason || "*none*"}`);
logEmbed.SendToModLogsChannel();
await logEmbed.SendToModLogsChannel();
publicEmbed.SendToCurrentChannel();
return {

View file

@ -85,7 +85,7 @@ export default class Mute extends Command {
await targetMember.roles.add(mutedRole, `Moderator: ${context.message.author.tag}, Reason: ${reason || "*none*"}`);
logEmbed.SendToModLogsChannel();
await logEmbed.SendToModLogsChannel();
publicEmbed.SendToCurrentChannel();
return {

View file

@ -85,7 +85,7 @@ export default class Unmute extends Command {
await targetMember.roles.remove(mutedRole, `Moderator: ${context.message.author.tag}, Reason: ${reason || "*none*"}`);
logEmbed.SendToModLogsChannel();
await logEmbed.SendToModLogsChannel();
publicEmbed.SendToCurrentChannel();
return {

View file

@ -15,7 +15,7 @@ export default class Warn extends Command {
];
}
public override execute(context: ICommandContext): ICommandReturnContext {
public override async execute(context: ICommandContext): Promise<ICommandReturnContext> {
const user = context.message.mentions.users.first();
if (!user) {
@ -60,7 +60,7 @@ export default class Warn extends Command {
const publicEmbed = new PublicEmbed(context, "", `${user} has been warned`);
publicEmbed.AddReason(reason);
logEmbed.SendToModLogsChannel();
await logEmbed.SendToModLogsChannel();
publicEmbed.SendToCurrentChannel();
return {