From ce69e428ca330a2ce8c10bdb5f85dc70a235b682 Mon Sep 17 00:00:00 2001 From: Ayfri Date: Sun, 21 Mar 2021 19:09:37 +0100 Subject: [PATCH] refactor: Reformat code. --- src/Fetcher.ts | 10 +++++----- src/index.ts | 4 ++-- src/main.js | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Fetcher.ts b/src/Fetcher.ts index f0c7619..82c7dd4 100644 --- a/src/Fetcher.ts +++ b/src/Fetcher.ts @@ -1,5 +1,5 @@ -import { Client, Message, Collection, Snowflake, TextChannel, Guild } from 'discord.js'; -import { EventEmitter } from 'events'; +import {Client, Collection, Guild, Message, Snowflake, TextChannel} from 'discord.js'; +import {EventEmitter} from 'events'; /** * The main class used to fetch things. @@ -51,7 +51,7 @@ export class Fetcher extends EventEmitter { } return messages; } - + /** * Fetch an array of Snowflakes or TextChannels or a collection of TextChannels. * @param channels - The channels to fetch. @@ -60,14 +60,14 @@ export class Fetcher extends EventEmitter { public async fetchChannels(channels: Array | Collection): Promise> { if (channels instanceof Collection) channels = channels.array(); let messages = new Collection(); - + this.fetching = true; for (const channel of channels) { const channelMessages = await this.fetchChannel(channel); messages = messages.concat(channelMessages); } this.fetching = false; - + return messages; } diff --git a/src/index.ts b/src/index.ts index c4e3dd8..aafb8db 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,2 +1,2 @@ -export { fetchChannelMessages, fetchGuildMessages } from './main.js'; -export { Fetcher } from './Fetcher'; +export {fetchChannelMessages, fetchGuildMessages} from './main.js'; +export {Fetcher} from './Fetcher'; diff --git a/src/main.js b/src/main.js index 3e8cf16..c9555cc 100644 --- a/src/main.js +++ b/src/main.js @@ -1,4 +1,4 @@ -const { deprecate } = require('util'); +const {deprecate} = require('util'); /** * Fetch all the messages from a Discord TextChannel.