diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-08-30 13:12:16 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-08-30 13:12:16 -0400 |
commit | 22009ec8da37fc2cd235d0b0c987a0fe45a69e27 (patch) | |
tree | 69a47217fb1f28cdcbec9622ac8c8252848eb595 /src/lib/extensions/discord-akairo | |
parent | 8d819519b4376441ca156b6146600382a319a0ba (diff) | |
download | tanzanite-22009ec8da37fc2cd235d0b0c987a0fe45a69e27.tar.gz tanzanite-22009ec8da37fc2cd235d0b0c987a0fe45a69e27.tar.bz2 tanzanite-22009ec8da37fc2cd235d0b0c987a0fe45a69e27.zip |
need to make commit early
Diffstat (limited to 'src/lib/extensions/discord-akairo')
-rw-r--r-- | src/lib/extensions/discord-akairo/BushClientUtil.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/extensions/discord-akairo/BushClientUtil.ts b/src/lib/extensions/discord-akairo/BushClientUtil.ts index 9a5a07f..ddc03d0 100644 --- a/src/lib/extensions/discord-akairo/BushClientUtil.ts +++ b/src/lib/extensions/discord-akairo/BushClientUtil.ts @@ -1126,7 +1126,7 @@ export class BushClientUtil extends ClientUtil { user: BushGuildMemberResolvable; duration: number | undefined; guild: BushGuildResolvable; - modlog: string; + modlog?: string; extraInfo?: Snowflake; }): Promise<ActivePunishment | null> { const expires = options.duration ? new Date(new Date().getTime() + options.duration) : undefined; @@ -1134,8 +1134,10 @@ export class BushClientUtil extends ClientUtil { const guild = client.guilds.resolveId(options.guild)!; const type = this.#findTypeEnum(options.type)!; + + const entry = options.extraInfo - ? ActivePunishment.build({ user, type, guild, expires, modlog: options.modlog, extraInfo: options.extraInfo }) + ? ActivePunishment.build({ user, type, guild, expires, modlog: options.modlog??, extraInfo: options.extraInfo }) : ActivePunishment.build({ user, type, guild, expires, modlog: options.modlog }); return await entry.save().catch((e) => { void client.console.error('createPunishmentEntry', e?.stack || e); |