Skip to content

Commit d456e20

Browse files
committed
chore: oops
1 parent e1372ab commit d456e20

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/lib/precondition-resolvers/cooldown.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ export function parseConstructorPreConditionsCooldown<P, O extends Command.Optio
2828
// be set. If an overridden value is passed, it will have priority. Otherwise, it will default to 0 if filtered
2929
// (causing the precondition to not be registered) or the default value with a fallback to a single-use cooldown.
3030
const filtered = defaultCooldown?.filteredCommands?.includes(command.name) ?? false;
31-
const limit = cooldownLimit ?? (filtered ? 0 : defaultCooldown?.limit ?? 1);
32-
const delay = cooldownDelay ?? (filtered ? 0 : defaultCooldown?.delay ?? 0);
31+
const limit = cooldownLimit ?? (filtered ? 0 : (defaultCooldown?.limit ?? 1));
32+
const delay = cooldownDelay ?? (filtered ? 0 : (defaultCooldown?.delay ?? 0));
3333

3434
if (limit && delay) {
3535
const scope = cooldownScope ?? defaultCooldown?.scope ?? BucketScope.User;

src/lib/resolvers/guildChannel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export function resolveGuildChannel(parameter: string, guild: Guild): Result<Gui
1616

1717
function resolveById(argument: string, guild: Guild): GuildBasedChannelTypes | null {
1818
const channelId = ChannelMentionRegex.exec(argument) ?? SnowflakeRegex.exec(argument);
19-
return channelId ? (guild.channels.cache.get(channelId[1] as Snowflake) as GuildBasedChannelTypes) ?? null : null;
19+
return channelId ? ((guild.channels.cache.get(channelId[1] as Snowflake) as GuildBasedChannelTypes) ?? null) : null;
2020
}
2121

2222
function resolveByQuery(argument: string, guild: Guild): GuildBasedChannelTypes | null {

src/lib/structures/Listener.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ export abstract class Listener<E extends keyof ClientEvents | symbol = '', Optio
7373
this.emitter =
7474
typeof options.emitter === 'undefined'
7575
? this.container.client
76-
: (typeof options.emitter === 'string'
76+
: ((typeof options.emitter === 'string'
7777
? (Reflect.get(this.container.client, options.emitter) as EventEmitter)
78-
: (options.emitter as EventEmitter)) ?? null;
78+
: (options.emitter as EventEmitter)) ?? null);
7979
this.event = options.event ?? this.name;
8080
this.once = options.once ?? false;
8181

0 commit comments

Comments
 (0)