aboutsummaryrefslogtreecommitdiff
path: root/src/lib/extensions/discord.js/BushGuildMember.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-12-30 21:36:34 -0500
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-12-30 21:36:34 -0500
commit5481971d8dae490a467dd592ca301e72acb2254a (patch)
tree4fe3c5b5f50b8d0eda04018f8906ec806b1d9b56 /src/lib/extensions/discord.js/BushGuildMember.ts
parent83db032fb91996c926a5d007a9e5fa4abed65871 (diff)
downloadtanzanite-5481971d8dae490a467dd592ca301e72acb2254a.tar.gz
tanzanite-5481971d8dae490a467dd592ca301e72acb2254a.tar.bz2
tanzanite-5481971d8dae490a467dd592ca301e72acb2254a.zip
A bit of fixing
Diffstat (limited to 'src/lib/extensions/discord.js/BushGuildMember.ts')
-rw-r--r--src/lib/extensions/discord.js/BushGuildMember.ts15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/lib/extensions/discord.js/BushGuildMember.ts b/src/lib/extensions/discord.js/BushGuildMember.ts
index ffca507..e7df926 100644
--- a/src/lib/extensions/discord.js/BushGuildMember.ts
+++ b/src/lib/extensions/discord.js/BushGuildMember.ts
@@ -1,14 +1,14 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
import {
BushClientEvents,
- BushGuildTextBasedChannel,
- BushGuildTextChannelResolvable,
- BushThreadChannelResolvable,
Moderation,
ModLogType,
type BushClient,
type BushGuild,
+ type BushGuildTextBasedChannel,
+ type BushGuildTextChannelResolvable,
type BushRole,
+ type BushThreadChannelResolvable,
type BushUser
} from '#lib';
import { GuildMember, MessageEmbed, type Partialize, type Role } from 'discord.js';
@@ -44,7 +44,8 @@ export class BushGuildMember extends GuildMember {
const dmSuccess = await this.send({
content: `You have been ${punishment} in **${this.guild.name}** ${
duration !== null && duration !== undefined ? (duration ? `for ${util.humanizeDuration(duration)} ` : 'permanently ') : ''
- }for **${reason?.trim() ?? 'No reason provided'}**.`,
+ // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
+ }for **${reason?.trim() || 'No reason provided'}**.`,
embeds: dmEmbed ? [dmEmbed] : undefined
}).catch(() => false);
return !!dmSuccess;
@@ -559,7 +560,8 @@ export class BushGuildMember extends GuildMember {
? `for ${util.humanizeDuration(options.duration)} `
: 'permanently '
: ''
- }for **${options.reason?.trim() ?? 'No reason provided'}**.`
+ // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
+ }for **${options.reason?.trim() || 'No reason provided'}**.`
}).catch(() => false);
dmSuccessEvent = !!dmSuccess;
@@ -633,7 +635,8 @@ export class BushGuildMember extends GuildMember {
// dm user
const dmSuccess = await this.send({
content: `You have been unblocked from <#${channel.id}> in **${this.guild.name}** for **${
- options.reason?.trim() ?? 'No reason provided'
+ // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
+ options.reason?.trim() || 'No reason provided'
}**.`
}).catch(() => false);
dmSuccessEvent = !!dmSuccess;