From 823a0754e4dcf293fb5e28c6fa6237ae9e9a1c5d Mon Sep 17 00:00:00 2001 From: Skillz4Killz Date: Tue, 12 Oct 2021 21:30:41 +0000 Subject: [PATCH] change: prettier code --- src/bot.ts | 57 ++++++++++++++++++++++++++++++---------------------- src/cache.ts | 2 +- 2 files changed, 34 insertions(+), 25 deletions(-) diff --git a/src/bot.ts b/src/bot.ts index df02ca02e..341d5cea6 100644 --- a/src/bot.ts +++ b/src/bot.ts @@ -506,30 +506,39 @@ export interface EventHandlers { channelDelete: (bot: Bot, channel: DiscordenoChannel) => any; channelPinsUpdate: (bot: Bot, data: { guildId?: bigint; channelId: bigint; lastPinTimestamp?: number }) => any; channelUpdate: (bot: Bot, channel: DiscordenoChannel, oldChannel: DiscordenoChannel) => any; - stageInstanceCreate: (bot: Bot, data: { - id: bigint; - guildId: bigint; - channelId: bigint; - topic: string; - privacyLevel: number; - discoverableDisabled: boolean; - }) => any; - stageInstanceDelete: (bot: Bot, data: { - id: bigint; - guildId: bigint; - channelId: bigint; - topic: string; - privacyLevel: number; - discoverableDisabled: boolean; - }) => any; - stageInstanceUpdate: (bot: Bot, data: { - id: bigint; - guildId: bigint; - channelId: bigint; - topic: string; - privacyLevel: number; - discoverableDisabled: boolean; - }) => any; + stageInstanceCreate: ( + bot: Bot, + data: { + id: bigint; + guildId: bigint; + channelId: bigint; + topic: string; + privacyLevel: number; + discoverableDisabled: boolean; + } + ) => any; + stageInstanceDelete: ( + bot: Bot, + data: { + id: bigint; + guildId: bigint; + channelId: bigint; + topic: string; + privacyLevel: number; + discoverableDisabled: boolean; + } + ) => any; + stageInstanceUpdate: ( + bot: Bot, + data: { + id: bigint; + guildId: bigint; + channelId: bigint; + topic: string; + privacyLevel: number; + discoverableDisabled: boolean; + } + ) => any; } export function createBotConstants() { diff --git a/src/cache.ts b/src/cache.ts index 2ea0ed136..b548a58e8 100644 --- a/src/cache.ts +++ b/src/cache.ts @@ -33,7 +33,7 @@ async function guildSweeper(bot: Bot, guild: DiscordenoGuild) { async function channelSweeper(bot: Bot, channel: DiscordenoChannel, key: bigint) { // If this is in a guild and the guild was dispatched, then we can dispatch the channel - if (channel.guildId && await bot.cache.dispatchedGuildIds.has(channel.guildId)) { + if (channel.guildId && (await bot.cache.dispatchedGuildIds.has(channel.guildId))) { await bot.cache.dispatchedChannelIds.set(channel.id); return true; }