diff --git a/src/cache.ts b/src/cache.ts index 16615d79d..34b56941c 100644 --- a/src/cache.ts +++ b/src/cache.ts @@ -171,7 +171,7 @@ export function createExecute(cache: Cache): CacheExecutor { return function (type, options) { switch (type) { case "FILTER_CATEGORY_CHILDREN_CHANNELS": - return cache.channels.filter(c => c.parentId === options.parentChannelId); + return cache.channels.filter((c) => c.parentId === options.parentChannelId); case "DELETE_MESSAGES_FROM_CHANNEL": cache.messages.forEach((message) => { if (message.channelId === options.channelId) { diff --git a/src/helpers/integrations/get_integrations.ts b/src/helpers/integrations/get_integrations.ts index 63c7a464f..9c1cbadac 100644 --- a/src/helpers/integrations/get_integrations.ts +++ b/src/helpers/integrations/get_integrations.ts @@ -5,9 +5,5 @@ import type { Bot } from "../../bot.ts"; export async function getIntegrations(bot: Bot, guildId: bigint) { await bot.utils.requireBotGuildPermissions(bot, guildId, ["MANAGE_GUILD"]); - return await bot.rest.runMethod( - bot.rest, - "get", - bot.constants.endpoints.GUILD_INTEGRATIONS(guildId) - ); + return await bot.rest.runMethod(bot.rest, "get", bot.constants.endpoints.GUILD_INTEGRATIONS(guildId)); } diff --git a/tests/helpers/channels/cloneChannel.ts b/tests/helpers/channels/cloneChannel.ts index e43f86444..06e4dc471 100644 --- a/tests/helpers/channels/cloneChannel.ts +++ b/tests/helpers/channels/cloneChannel.ts @@ -3,7 +3,13 @@ import { DiscordenoChannel } from "../../../src/transformers/channel.ts"; import { assertExists, assertEquals } from "../../deps.ts"; import { delayUntil } from "../../utils.ts"; -export async function cloneChannelTests(bot: Bot, guildId: bigint, channel: DiscordenoChannel, options: {reason?: string}, t: Deno.TestContext) { +export async function cloneChannelTests( + bot: Bot, + guildId: bigint, + channel: DiscordenoChannel, + options: { reason?: string }, + t: Deno.TestContext +) { const cloned = await bot.helpers.cloneChannel(channel.id, options.reason); //Assertations diff --git a/tests/mod.ts b/tests/mod.ts index 75541f53b..ad6f99956 100644 --- a/tests/mod.ts +++ b/tests/mod.ts @@ -1,7 +1,7 @@ import { memoryBenchmarks } from "../benchmarks/index.ts"; import { TOKEN } from "../configs.ts"; import { -channelOverwriteHasPermission, + channelOverwriteHasPermission, createBot, createEventHandlers, DiscordChannelTypes, @@ -557,19 +557,19 @@ Deno.test({ name: "[channel] edit a channel permission overwrite", async fn() { await channelOverwriteHasPermissionTest(bot, guild.id, t); - } + }, }), t.step({ name: "[channel] clone a channel w/o a reason", async fn() { await cloneChannelTests(bot, guild.id, channel, {}, t); - } + }, }), t.step({ name: "[channel] clone a channel w/ a reason", async fn() { - await cloneChannelTests(bot, guild.id, channel, { reason: "Blame wolf"}, t); - } + await cloneChannelTests(bot, guild.id, channel, { reason: "Blame wolf" }, t); + }, }), t.step({ name: "[channel] delete a channel overwrite", @@ -587,7 +587,7 @@ Deno.test({ name: "[channel] edit a channel w/ a reason", async fn() { await editChannelTests(bot, guild.id, { reason: "Blame wolf"}, t); - } + }, }), ]);