Get commands and events to use database
This commit is contained in:
parent
8b2da347b1
commit
6ca08bee78
15 changed files with 119 additions and 56 deletions
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue