diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2021-07-19 01:04:33 +0000 |
---|---|---|
committer | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2021-07-19 01:04:33 +0000 |
commit | b754bdd64bf09a6b9af9d30cca8e68ad7888355f (patch) | |
tree | 431a8bd4922ab393864f3686b301cd259ba4b4e1 /src/lib/extensions | |
parent | 8bb57f756e641c54cd0f8c172456ebf4c8fed7d4 (diff) | |
download | tanzanite-b754bdd64bf09a6b9af9d30cca8e68ad7888355f.tar.gz tanzanite-b754bdd64bf09a6b9af9d30cca8e68ad7888355f.tar.bz2 tanzanite-b754bdd64bf09a6b9af9d30cca8e68ad7888355f.zip |
Automatically format code
Diffstat (limited to 'src/lib/extensions')
-rw-r--r-- | src/lib/extensions/discord-akairo/BushClientUtil.ts | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lib/extensions/discord-akairo/BushClientUtil.ts b/src/lib/extensions/discord-akairo/BushClientUtil.ts index 9ccce65..1924de8 100644 --- a/src/lib/extensions/discord-akairo/BushClientUtil.ts +++ b/src/lib/extensions/discord-akairo/BushClientUtil.ts @@ -669,15 +669,17 @@ export class BushClientUtil extends ClientUtil { duration: number; guild: BushGuildResolvable; modlog: string; - role?: Snowflake + role?: Snowflake; }): Promise<Mute | Ban | PunishmentRole> { const dbModel = this.findPunishmentModel(options.type); const expires = options.duration ? new Date(new Date().getTime() + options.duration) : null; const user = this.client.users.resolveId(options.user); const guild = this.client.guilds.resolveId(options.guild); - - const entry = options.type === 'role' ? (dbModel as typeof PunishmentRole).build({ user, guild, expires, modlog: options.modlog, role: options.role }):dbModel.build({ user, guild, expires, modlog: options.modlog }); + const entry = + options.type === 'role' + ? (dbModel as typeof PunishmentRole).build({ user, guild, expires, modlog: options.modlog, role: options.role }) + : dbModel.build({ user, guild, expires, modlog: options.modlog }); return await entry.save().catch((e) => { this.client.console.error('createPunishmentEntry', e?.stack || e); return null; |