diff --git a/src/arguments/roleName.ts b/src/arguments/roleName.ts index c1d967375..885e25350 100644 --- a/src/arguments/roleName.ts +++ b/src/arguments/roleName.ts @@ -28,7 +28,7 @@ export class UserArgument extends Argument { public resolveRole(query: string, guild: Guild) { const role = RoleMentionRegex.exec(query) ?? SnowflakeRegex.exec(query); - return role ? guild.roles.cache.get(role[1]) ?? null : null; + return role ? (guild.roles.cache.get(role[1]) ?? null) : null; } } diff --git a/src/lib/database/settings/schema/SchemaGroup.ts b/src/lib/database/settings/schema/SchemaGroup.ts index fcbf0c95f..b2518ab64 100644 --- a/src/lib/database/settings/schema/SchemaGroup.ts +++ b/src/lib/database/settings/schema/SchemaGroup.ts @@ -63,7 +63,7 @@ export class SchemaGroup extends AliasedCollection impleme public getPathArray([key, ...tail]: NonEmptyArray): ISchemaValue | null { if (tail.length === 0) { - return key === '' || key === '.' ? this : this.get(key) ?? null; + return key === '' || key === '.' ? this : (this.get(key) ?? null); } const value = this.get(key); diff --git a/src/lib/util/functions/emojis.ts b/src/lib/util/functions/emojis.ts index 96402d01f..6b1a0dd17 100644 --- a/src/lib/util/functions/emojis.ts +++ b/src/lib/util/functions/emojis.ts @@ -149,5 +149,5 @@ export function getEmojiObject(emoji: string): EmojiObject | null { export function resolveEmojiId(emoji: EmojiObject | SerializedEmoji): string { if (isNullish(emoji)) return ''; - return typeof emoji === 'string' ? getEmojiId(emoji) : emoji.id ?? encodeURIComponent(emoji.name!); + return typeof emoji === 'string' ? getEmojiId(emoji) : (emoji.id ?? encodeURIComponent(emoji.name!)); } diff --git a/src/listeners/guilds/guildUpdateNotify.ts b/src/listeners/guilds/guildUpdateNotify.ts index 209c004a3..aaa34dd32 100644 --- a/src/listeners/guilds/guildUpdateNotify.ts +++ b/src/listeners/guilds/guildUpdateNotify.ts @@ -305,7 +305,9 @@ export class UserListener extends Listener { private displayWidgetEnabled(t: TFunction, previous: boolean | null, next: boolean | null): string { return t( - next ?? !previous ? LanguageKeys.Events.Guilds.Logs.ServerUpdateWidgetEnabled : LanguageKeys.Events.Guilds.Logs.ServerUpdateWidgetDisabled + (next ?? !previous) + ? LanguageKeys.Events.Guilds.Logs.ServerUpdateWidgetEnabled + : LanguageKeys.Events.Guilds.Logs.ServerUpdateWidgetDisabled ); } }