Feature/vba 77 (#178)
* Add say command (#174) Co-authored-by: Ethan Lane <ethan@vylpes.com> Reviewed-on: https://gitea.vylpes.xyz/RabbitLabs/vylbot-app/pulls/174 * Add repo and funding link to about message (#176) Reviewed-on: https://gitea.vylpes.xyz/RabbitLabs/vylbot-app/pulls/176 * Add other subreddits to bunny command (#177) Reviewed-on: https://gitea.vylpes.xyz/RabbitLabs/vylbot-app/pulls/177 * Add database table * Save moderation actions to database * Add audit command to see a user's audits * Add audit view subcommand * Add audit clear subcommand * Create add audit subcommand * Fix bot crashing when viewing an audit with no reason * Fix changes requested
This commit is contained in:
parent
2da5e1aa75
commit
cd666d24fd
12 changed files with 293 additions and 1 deletions
|
@ -5,6 +5,8 @@ import PublicEmbed from "../helpers/embeds/PublicEmbed";
|
|||
import { Command } from "../type/command";
|
||||
import { ICommandContext } from "../contracts/ICommandContext";
|
||||
import ICommandReturnContext from "../contracts/ICommandReturnContext";
|
||||
import Audit from "../entity/Audit";
|
||||
import { AuditType } from "../constants/AuditType";
|
||||
|
||||
export default class Ban extends Command {
|
||||
constructor() {
|
||||
|
@ -75,6 +77,12 @@ export default class Ban extends Command {
|
|||
await logEmbed.SendToModLogsChannel();
|
||||
await publicEmbed.SendToCurrentChannel();
|
||||
|
||||
if (context.message.guild) {
|
||||
const audit = new Audit(targetUser.id, AuditType.Ban, reason, context.message.author.id, context.message.guild.id);
|
||||
|
||||
await audit.Save(Audit, audit);
|
||||
}
|
||||
|
||||
return {
|
||||
commandContext: context,
|
||||
embeds: [logEmbed, publicEmbed],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue