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:
Vylpes 2022-09-05 18:10:04 +01:00 committed by GitHub
parent 2da5e1aa75
commit cd666d24fd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 293 additions and 1 deletions

View file

@ -1,5 +1,7 @@
import { AuditType } from "../constants/AuditType";
import { ICommandContext } from "../contracts/ICommandContext";
import ICommandReturnContext from "../contracts/ICommandReturnContext";
import Audit from "../entity/Audit";
import ErrorEmbed from "../helpers/embeds/ErrorEmbed";
import LogEmbed from "../helpers/embeds/LogEmbed";
import PublicEmbed from "../helpers/embeds/PublicEmbed";
@ -62,6 +64,12 @@ export default class Warn extends Command {
await logEmbed.SendToModLogsChannel();
await publicEmbed.SendToCurrentChannel();
if (context.message.guild) {
const audit = new Audit(user.id, AuditType.Warn, reason, context.message.author.id, context.message.guild.id);
await audit.Save(Audit, audit);
}
return {
commandContext: context,