Skip to content

Commit

Permalink
refactor: formated files
Browse files Browse the repository at this point in the history
  • Loading branch information
RedStar071 committed Jul 15, 2024
1 parent 574974c commit c76810d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/arguments/roleName.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export class UserArgument extends Argument<Role> {

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;
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/lib/database/settings/schema/SchemaGroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export class SchemaGroup extends AliasedCollection<string, ISchemaValue> impleme

public getPathArray([key, ...tail]: NonEmptyArray<string>): 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);
Expand Down
2 changes: 1 addition & 1 deletion src/lib/util/functions/emojis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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!));
}
4 changes: 3 additions & 1 deletion src/listeners/guilds/guildUpdateNotify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,9 @@ export class UserListener extends Listener<typeof Events.GuildUpdate> {

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
);
}
}

0 comments on commit c76810d

Please sign in to comment.