diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-11-22 19:01:46 -0500 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-11-22 19:01:46 -0500 |
commit | fce1fc87feb3e6dad1a956d757d856833c9ea5f6 (patch) | |
tree | 723ca41af60df525b89c6ff5b4e9574f78235734 /src/lib/extensions/discord.js | |
parent | 23bf2485fe17472f17bd0ee0af6b22973e317550 (diff) | |
download | tanzanite-fce1fc87feb3e6dad1a956d757d856833c9ea5f6.tar.gz tanzanite-fce1fc87feb3e6dad1a956d757d856833c9ea5f6.tar.bz2 tanzanite-fce1fc87feb3e6dad1a956d757d856833c9ea5f6.zip |
update contributors, fix formatting, added a bunch of repo forks
Diffstat (limited to 'src/lib/extensions/discord.js')
7 files changed, 51 insertions, 67 deletions
diff --git a/src/lib/extensions/discord.js/BushBaseGuildTextChannel.ts b/src/lib/extensions/discord.js/BushBaseGuildTextChannel.ts index 652a50f..c3c279e 100644 --- a/src/lib/extensions/discord.js/BushBaseGuildTextChannel.ts +++ b/src/lib/extensions/discord.js/BushBaseGuildTextChannel.ts @@ -1,11 +1,4 @@ -import type { - BushCategoryChannel, - BushClient, - BushGuild, - BushGuildMember, - BushMessageManager, - BushThreadManager -} from '#lib'; +import type { BushCategoryChannel, BushClient, BushGuild, BushGuildMember, BushMessageManager, BushThreadManager } from '#lib'; import { BaseGuildTextChannel, type AllowedThreadTypeForNewsChannel, diff --git a/src/lib/extensions/discord.js/BushGuild.ts b/src/lib/extensions/discord.js/BushGuild.ts index 5849749..ff920ce 100644 --- a/src/lib/extensions/discord.js/BushGuild.ts +++ b/src/lib/extensions/discord.js/BushGuild.ts @@ -191,7 +191,11 @@ export class BushGuild extends Guild { const userObject = client.users.cache.get(user.id); const dmSuccess = await userObject - ?.send(`You have been unbanned from **${util.discord.escapeMarkdown(this.toString())}** for **${options.reason ?? 'No reason provided'}**.`) + ?.send( + `You have been unbanned from **${util.discord.escapeMarkdown(this.toString())}** for **${ + options.reason ?? 'No reason provided' + }**.` + ) .catch(() => false); dmSuccessEvent = !!dmSuccess; diff --git a/src/lib/extensions/discord.js/BushGuildManager.d.ts b/src/lib/extensions/discord.js/BushGuildManager.d.ts index 5bb8822..4dd0750 100644 --- a/src/lib/extensions/discord.js/BushGuildManager.d.ts +++ b/src/lib/extensions/discord.js/BushGuildManager.d.ts @@ -3,7 +3,8 @@ import { CachedManager, type Collection, type FetchGuildOptions, - type FetchGuildsOptions, type GuildCreateOptions, + type FetchGuildsOptions, + type GuildCreateOptions, type OAuth2Guild, type Snowflake } from 'discord.js'; diff --git a/src/lib/extensions/discord.js/BushGuildMemberManager.d.ts b/src/lib/extensions/discord.js/BushGuildMemberManager.d.ts index 8b1248c..0866fce 100644 --- a/src/lib/extensions/discord.js/BushGuildMemberManager.d.ts +++ b/src/lib/extensions/discord.js/BushGuildMemberManager.d.ts @@ -1,11 +1,4 @@ -import type { - BushClient, - BushGuild, - BushGuildMember, - BushGuildMemberResolvable, - BushUser, - BushUserResolvable -} from '#lib'; +import type { BushClient, BushGuild, BushGuildMember, BushGuildMemberResolvable, BushUser, BushUserResolvable } from '#lib'; import { CachedManager, type AddGuildMemberOptions, diff --git a/src/lib/extensions/discord.js/BushMessageManager.d.ts b/src/lib/extensions/discord.js/BushMessageManager.d.ts index 9ded94c..f6bc8e7 100644 --- a/src/lib/extensions/discord.js/BushMessageManager.d.ts +++ b/src/lib/extensions/discord.js/BushMessageManager.d.ts @@ -1,26 +1,27 @@ import { BushMessageResolvable, type BushMessage, type BushTextBasedChannels } from '#lib'; import { - CachedManager, - type BaseFetchOptions, - type ChannelLogsQueryOptions, - type Collection, - type EmojiIdentifierResolvable, - type MessageEditOptions, - type MessagePayload, type Snowflake + CachedManager, + type BaseFetchOptions, + type ChannelLogsQueryOptions, + type Collection, + type EmojiIdentifierResolvable, + type MessageEditOptions, + type MessagePayload, + type Snowflake } from 'discord.js'; import type { RawMessageData } from 'discord.js/typings/rawDataTypes'; export class BushMessageManager extends CachedManager<Snowflake, BushMessage, BushMessageResolvable> { - public constructor(channel: BushTextBasedChannels, iterable?: Iterable<RawMessageData>); - public channel: BushTextBasedChannels; - public cache: Collection<Snowflake, BushMessage>; - public crosspost(message: BushMessageResolvable): Promise<BushMessage>; - public delete(message: BushMessageResolvable): Promise<void>; - public edit(message: BushMessageResolvable, options: MessagePayload | MessageEditOptions): Promise<BushMessage>; - public fetch(message: Snowflake, options?: BaseFetchOptions): Promise<BushMessage>; - public fetch(options?: ChannelLogsQueryOptions, cacheOptions?: BaseFetchOptions): Promise<Collection<Snowflake, BushMessage>>; - public fetchPinned(cache?: boolean): Promise<Collection<Snowflake, BushMessage>>; - public react(message: BushMessageResolvable, emoji: EmojiIdentifierResolvable): Promise<void>; - public pin(message: BushMessageResolvable): Promise<void>; - public unpin(message: BushMessageResolvable): Promise<void>; + public constructor(channel: BushTextBasedChannels, iterable?: Iterable<RawMessageData>); + public channel: BushTextBasedChannels; + public cache: Collection<Snowflake, BushMessage>; + public crosspost(message: BushMessageResolvable): Promise<BushMessage>; + public delete(message: BushMessageResolvable): Promise<void>; + public edit(message: BushMessageResolvable, options: MessagePayload | MessageEditOptions): Promise<BushMessage>; + public fetch(message: Snowflake, options?: BaseFetchOptions): Promise<BushMessage>; + public fetch(options?: ChannelLogsQueryOptions, cacheOptions?: BaseFetchOptions): Promise<Collection<Snowflake, BushMessage>>; + public fetchPinned(cache?: boolean): Promise<Collection<Snowflake, BushMessage>>; + public react(message: BushMessageResolvable, emoji: EmojiIdentifierResolvable): Promise<void>; + public pin(message: BushMessageResolvable): Promise<void>; + public unpin(message: BushMessageResolvable): Promise<void>; } diff --git a/src/lib/extensions/discord.js/BushThreadManager.d.ts b/src/lib/extensions/discord.js/BushThreadManager.d.ts index 6822a80..c824ae7 100644 --- a/src/lib/extensions/discord.js/BushThreadManager.d.ts +++ b/src/lib/extensions/discord.js/BushThreadManager.d.ts @@ -1,27 +1,25 @@ -import type { - BushThreadChannel -} from '#lib'; +import type { BushThreadChannel } from '#lib'; import { - CachedManager, - FetchedThreads, - NewsChannel, - TextChannel, - ThreadChannel, - type BaseFetchOptions, - type FetchArchivedThreadOptions, - type FetchThreadsOptions, - type Snowflake, - type ThreadChannelResolvable, - type ThreadCreateOptions + CachedManager, + FetchedThreads, + NewsChannel, + TextChannel, + ThreadChannel, + type BaseFetchOptions, + type FetchArchivedThreadOptions, + type FetchThreadsOptions, + type Snowflake, + type ThreadChannelResolvable, + type ThreadCreateOptions } from 'discord.js'; import type { RawThreadChannelData } from 'discord.js/typings/rawDataTypes'; export class BushThreadManager<AllowedThreadType> extends CachedManager<Snowflake, BushThreadChannel, ThreadChannelResolvable> { - public constructor(channel: TextChannel | NewsChannel, iterable?: Iterable<RawThreadChannelData>); - public channel: TextChannel | NewsChannel; - public create(options: ThreadCreateOptions<AllowedThreadType>): Promise<ThreadChannel>; - public fetch(options: ThreadChannelResolvable, cacheOptions?: BaseFetchOptions): Promise<ThreadChannel | null>; - public fetch(options?: FetchThreadsOptions, cacheOptions?: { cache?: boolean }): Promise<FetchedThreads>; - public fetchArchived(options?: FetchArchivedThreadOptions, cache?: boolean): Promise<FetchedThreads>; - public fetchActive(cache?: boolean): Promise<FetchedThreads>; -}
\ No newline at end of file + public constructor(channel: TextChannel | NewsChannel, iterable?: Iterable<RawThreadChannelData>); + public channel: TextChannel | NewsChannel; + public create(options: ThreadCreateOptions<AllowedThreadType>): Promise<ThreadChannel>; + public fetch(options: ThreadChannelResolvable, cacheOptions?: BaseFetchOptions): Promise<ThreadChannel | null>; + public fetch(options?: FetchThreadsOptions, cacheOptions?: { cache?: boolean }): Promise<FetchedThreads>; + public fetchArchived(options?: FetchArchivedThreadOptions, cache?: boolean): Promise<FetchedThreads>; + public fetchActive(cache?: boolean): Promise<FetchedThreads>; +} diff --git a/src/lib/extensions/discord.js/BushThreadMemberManager.d.ts b/src/lib/extensions/discord.js/BushThreadMemberManager.d.ts index 082d87c..7560c0e 100644 --- a/src/lib/extensions/discord.js/BushThreadMemberManager.d.ts +++ b/src/lib/extensions/discord.js/BushThreadMemberManager.d.ts @@ -1,11 +1,5 @@ import type { BushClient, BushThreadChannel, BushThreadMember, BushThreadMemberResolvable } from '#lib'; -import { - CachedManager, - type BaseFetchOptions, - type Collection, - type Snowflake, - type UserResolvable -} from 'discord.js'; +import { CachedManager, type BaseFetchOptions, type Collection, type Snowflake, type UserResolvable } from 'discord.js'; import type { RawThreadMemberData } from 'discord.js/typings/rawDataTypes'; export class BushThreadMemberManager extends CachedManager<Snowflake, BushThreadMember, BushThreadMemberResolvable> { @@ -14,7 +8,7 @@ export class BushThreadMemberManager extends CachedManager<Snowflake, BushThread public thread: BushThreadChannel; public add(member: UserResolvable | '@me', reason?: string): Promise<Snowflake>; public fetch(member?: UserResolvable, options?: BaseFetchOptions): Promise<BushThreadMember>; - /** @deprecated Use `fetch(member, options)` instead. */ + /** @deprecated Use `fetch(member, options)` instead. */ public fetch(cache?: boolean): Promise<Collection<Snowflake, BushThreadMember>>; public remove(id: Snowflake | '@me', reason?: string): Promise<Snowflake>; } |