mirror of
https://github.com/discordjs/discord.js.git
synced 2026-05-25 13:00:08 +00:00
Compare commits
6 Commits
@discordjs
...
14.3.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4e3fa586b5 | ||
|
|
6bb1474d20 | ||
|
|
27bbc8fe68 | ||
|
|
e2cde5daa0 | ||
|
|
0960457108 | ||
|
|
cd6b365b17 |
@@ -2,6 +2,19 @@
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
# [@discordjs/builders@1.2.0](https://github.com/discordjs/discord.js/compare/@discordjs/builders@1.1.0...@discordjs/builders@1.2.0) - (2022-08-22)
|
||||
|
||||
## Features
|
||||
|
||||
- **website:** Show `constructor` information (#8540) ([e42fd16](https://github.com/discordjs/discord.js/commit/e42fd1636973b10dd7ed6fb4280ee1a4a8f82007))
|
||||
- **website:** Show descriptions for `@typeParam` blocks (#8523) ([e475b63](https://github.com/discordjs/discord.js/commit/e475b63f257f6261d73cb89fee9ecbcdd84e2a6b))
|
||||
- **website:** Show parameter descriptions (#8519) ([7f415a2](https://github.com/discordjs/discord.js/commit/7f415a2502bf7ce2025dbcfed9017b0635a19966))
|
||||
- **WebSocketShard:** Support new resume url (#8480) ([bc06cc6](https://github.com/discordjs/discord.js/commit/bc06cc638d2f57ab5c600e8cdb6afc8eb2180166))
|
||||
|
||||
## Refactor
|
||||
|
||||
- Docs design (#8487) ([4ab1d09](https://github.com/discordjs/discord.js/commit/4ab1d09997a18879a9eb9bda39df6f15aa22557e))
|
||||
|
||||
# [@discordjs/builders@1.1.0](https://github.com/discordjs/discord.js/compare/@discordjs/builders@1.0.0...@discordjs/builders@1.1.0) - (2022-07-29)
|
||||
|
||||
## Bug Fixes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@discordjs/builders",
|
||||
"version": "1.1.0",
|
||||
"version": "1.2.0",
|
||||
"description": "A set of builders that you can use when creating your bot",
|
||||
"scripts": {
|
||||
"test": "vitest run",
|
||||
|
||||
@@ -2,6 +2,27 @@
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
# [@discordjs/collection@1.1.0](https://github.com/discordjs/discord.js/compare/@discordjs/collection@1.0.1...@discordjs/collection@1.1.0) - (2022-08-22)
|
||||
|
||||
## Bug Fixes
|
||||
|
||||
- Use proper format for `@link` text (#8384) ([2655639](https://github.com/discordjs/discord.js/commit/26556390a3800e954974a00c1328ff47d3e67e9a))
|
||||
|
||||
## Documentation
|
||||
|
||||
- Fence examples in codeblocks ([193b252](https://github.com/discordjs/discord.js/commit/193b252672440a860318d3c2968aedd9cb88e0ce))
|
||||
- Use link tags (#8382) ([5494791](https://github.com/discordjs/discord.js/commit/549479131318c659f86f0eb18578d597e22522d3))
|
||||
|
||||
## Features
|
||||
|
||||
- **website:** Show `constructor` information (#8540) ([e42fd16](https://github.com/discordjs/discord.js/commit/e42fd1636973b10dd7ed6fb4280ee1a4a8f82007))
|
||||
- **website:** Show descriptions for `@typeParam` blocks (#8523) ([e475b63](https://github.com/discordjs/discord.js/commit/e475b63f257f6261d73cb89fee9ecbcdd84e2a6b))
|
||||
|
||||
## Refactor
|
||||
|
||||
- **website:** Adjust typography (#8503) ([0f83402](https://github.com/discordjs/discord.js/commit/0f834029850d2448981596cf082ff59917018d66))
|
||||
- Docs design (#8487) ([4ab1d09](https://github.com/discordjs/discord.js/commit/4ab1d09997a18879a9eb9bda39df6f15aa22557e))
|
||||
|
||||
# [@discordjs/collection@0.8.0](https://github.com/discordjs/discord.js/compare/@discordjs/collection@0.7.0...@discordjs/collection@0.8.0) - (2022-07-17)
|
||||
|
||||
## Bug Fixes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@discordjs/collection",
|
||||
"version": "1.0.1",
|
||||
"version": "1.1.0",
|
||||
"description": "Utility data structure used in discord.js",
|
||||
"scripts": {
|
||||
"test": "vitest run",
|
||||
|
||||
@@ -2,6 +2,40 @@
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
# [14.3.0](https://github.com/discordjs/discord.js/compare/14.2.0...14.3.0) - (2022-08-22)
|
||||
|
||||
## Bug Fixes
|
||||
|
||||
- **GuildMemberManager:** `add()` method throws an error (#8539) ([3bef901](https://github.com/discordjs/discord.js/commit/3bef9018c0be3c5dc51d03b796d08b925dc4e1b9))
|
||||
- **Guild:** Widget channel types and fixes (#8530) ([23a0b6c](https://github.com/discordjs/discord.js/commit/23a0b6ccf27410963bd4f5c53d9ee2ce019e90a8))
|
||||
- **Embed:** Reference video in video (#8473) ([c97977a](https://github.com/discordjs/discord.js/commit/c97977a3e806bd5d8682bc7fb22ebec1a8ceecdc))
|
||||
|
||||
## Documentation
|
||||
|
||||
- **GuildAuditLogsEntry:** Correct `action` wording (#8499) ([7d25072](https://github.com/discordjs/discord.js/commit/7d2507279cc9d1397c7d61e7c7b856ff4bc17c86))
|
||||
|
||||
## Features
|
||||
|
||||
- **GuildMemberManager:** AddRole and removeRole (#8510) ([cda3f00](https://github.com/discordjs/discord.js/commit/cda3f005b1546fdb8410e9550526956f840857fc))
|
||||
- Deprecate `ActionRow.from()` (#8504) ([f9c25dd](https://github.com/discordjs/discord.js/commit/f9c25ddcfe68f089e13f1090c3df4bd7cd74d2b7))
|
||||
- **WebSocketShard:** Support new resume url (#8480) ([bc06cc6](https://github.com/discordjs/discord.js/commit/bc06cc638d2f57ab5c600e8cdb6afc8eb2180166))
|
||||
|
||||
## Refactor
|
||||
|
||||
- **GuildAuditLogsEntry:** Remove `guild` from application command permission update extra (#8520) ([2b8074d](https://github.com/discordjs/discord.js/commit/2b8074dd12f2f1e957caffb57e5fd4d7be88dc25))
|
||||
|
||||
## Typings
|
||||
|
||||
- Inference of guild in `MessageManager` (#8538) ([6bb1474](https://github.com/discordjs/discord.js/commit/6bb1474d2001b76773954c959b2c2687e1df0136))
|
||||
- Allow choice's value type to be strictly inferred (#8529) ([b3f7c32](https://github.com/discordjs/discord.js/commit/b3f7c32f7f91f12766178f5e17585856e81d9a87))
|
||||
- **GuildAuditLogs:** Allow fetching to return all possible values (#8522) ([0dba8ad](https://github.com/discordjs/discord.js/commit/0dba8adbd2e6efd634bd3eb31df09467ba8a8a0d))
|
||||
- Correct `EventEmitter.on (static)` return type (#8524) ([16bbc8a](https://github.com/discordjs/discord.js/commit/16bbc8aa208a8a16c22be24696f57d5f7a5faf2b))
|
||||
- **GuildAuditLogs:** Remove static `Entry` (#8521) ([7a3d18d](https://github.com/discordjs/discord.js/commit/7a3d18dd6d1fe27393d00019b9ecd35c98b95ee7))
|
||||
- Disallow some channel types from webhook creation (#8531) ([4882b17](https://github.com/discordjs/discord.js/commit/4882b17a77484f801faa19fb971f2e6abd88e59f))
|
||||
- Implement max/min values for autocomplete (#8498) ([812f7f1](https://github.com/discordjs/discord.js/commit/812f7f1ea86fc953aa796875cbc7ccc434203d77))
|
||||
- **ModalMessageModalSubmitInteraction:** ChannelId is not nullable (#8496) ([c31a5cf](https://github.com/discordjs/discord.js/commit/c31a5cfcc82706667768eac77b5f99ba69cf3c91))
|
||||
- Change type of ApplicationCommandSubCommand.options (#8476) ([ebaf158](https://github.com/discordjs/discord.js/commit/ebaf158006d3c7db3b8c695e7c027b8af11999ba))
|
||||
|
||||
# [14.2.0](https://github.com/discordjs/discord.js/compare/14.1.2...14.2.0) - (2022-08-10)
|
||||
|
||||
## Bug Fixes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "discord.js",
|
||||
"version": "14.2.0",
|
||||
"version": "14.3.0",
|
||||
"description": "A powerful library for interacting with the Discord API",
|
||||
"scripts": {
|
||||
"test": "yarn docs:test && yarn test:typescript",
|
||||
|
||||
102
packages/discord.js/typings/index.d.ts
vendored
102
packages/discord.js/typings/index.d.ts
vendored
@@ -123,6 +123,7 @@ import {
|
||||
FormattingPatterns,
|
||||
APIEmbedProvider,
|
||||
AuditLogOptionsType,
|
||||
TextChannelType,
|
||||
} from 'discord-api-types/v10';
|
||||
import { ChildProcess } from 'node:child_process';
|
||||
import { EventEmitter } from 'node:events';
|
||||
@@ -521,7 +522,7 @@ export class BaseGuildEmoji extends Emoji {
|
||||
public requiresColons: boolean | null;
|
||||
}
|
||||
|
||||
export class BaseGuildTextChannel extends TextBasedChannelMixin(GuildChannel) {
|
||||
export class BaseGuildTextChannel extends TextBasedChannelMixin(GuildChannel, true) {
|
||||
protected constructor(guild: Guild, data?: RawGuildChannelData, client?: Client, immediatePatch?: boolean);
|
||||
public defaultAutoArchiveDuration?: ThreadAutoArchiveDuration;
|
||||
public rateLimitPerUser: number | null;
|
||||
@@ -1049,7 +1050,7 @@ export class DataResolver extends null {
|
||||
public static resolveGuildTemplateCode(data: GuildTemplateResolvable): string;
|
||||
}
|
||||
|
||||
export class DMChannel extends TextBasedChannelMixin(BaseChannel, [
|
||||
export class DMChannel extends TextBasedChannelMixin(BaseChannel, false, [
|
||||
'bulkDelete',
|
||||
'fetchWebhooks',
|
||||
'createWebhook',
|
||||
@@ -1675,8 +1676,8 @@ export interface MappedInteractionTypes<Cached extends boolean = boolean> {
|
||||
[ComponentType.SelectMenu]: SelectMenuInteraction<WrapBooleanCache<Cached>>;
|
||||
}
|
||||
|
||||
export class Message<Cached extends boolean = boolean> extends Base {
|
||||
private readonly _cacheType: Cached;
|
||||
export class Message<InGuild extends boolean = boolean> extends Base {
|
||||
private readonly _cacheType: InGuild;
|
||||
private constructor(client: Client, data: RawMessageData);
|
||||
private _patch(data: RawPartialMessageData | RawMessageData): void;
|
||||
|
||||
@@ -1684,7 +1685,7 @@ export class Message<Cached extends boolean = boolean> extends Base {
|
||||
public applicationId: Snowflake | null;
|
||||
public attachments: Collection<Snowflake, Attachment>;
|
||||
public author: User;
|
||||
public get channel(): If<Cached, GuildTextBasedChannel, TextBasedChannel>;
|
||||
public get channel(): If<InGuild, GuildTextBasedChannel, TextBasedChannel>;
|
||||
public channelId: Snowflake;
|
||||
public get cleanContent(): string;
|
||||
public components: ActionRow<MessageActionRowComponent>[];
|
||||
@@ -1698,8 +1699,8 @@ export class Message<Cached extends boolean = boolean> extends Base {
|
||||
public editedTimestamp: number | null;
|
||||
public embeds: Embed[];
|
||||
public groupActivityApplication: ClientApplication | null;
|
||||
public guildId: If<Cached, Snowflake>;
|
||||
public get guild(): If<Cached, Guild>;
|
||||
public guildId: If<InGuild, Snowflake>;
|
||||
public get guild(): If<InGuild, Guild>;
|
||||
public get hasThread(): boolean;
|
||||
public id: Snowflake;
|
||||
public interaction: MessageInteraction | null;
|
||||
@@ -1720,30 +1721,30 @@ export class Message<Cached extends boolean = boolean> extends Base {
|
||||
public flags: Readonly<MessageFlagsBitField>;
|
||||
public reference: MessageReference | null;
|
||||
public awaitMessageComponent<T extends MessageComponentType>(
|
||||
options?: AwaitMessageCollectorOptionsParams<T, Cached>,
|
||||
): Promise<MappedInteractionTypes<Cached>[T]>;
|
||||
options?: AwaitMessageCollectorOptionsParams<T, InGuild>,
|
||||
): Promise<MappedInteractionTypes<InGuild>[T]>;
|
||||
public awaitReactions(options?: AwaitReactionsOptions): Promise<Collection<Snowflake | string, MessageReaction>>;
|
||||
public createReactionCollector(options?: ReactionCollectorOptions): ReactionCollector;
|
||||
public createMessageComponentCollector<T extends MessageComponentType>(
|
||||
options?: MessageCollectorOptionsParams<T, Cached>,
|
||||
): InteractionCollector<MappedInteractionTypes<Cached>[T]>;
|
||||
public delete(): Promise<Message>;
|
||||
public edit(content: string | MessageEditOptions | MessagePayload): Promise<Message>;
|
||||
options?: MessageCollectorOptionsParams<T, InGuild>,
|
||||
): InteractionCollector<MappedInteractionTypes<InGuild>[T]>;
|
||||
public delete(): Promise<Message<InGuild>>;
|
||||
public edit(content: string | MessageEditOptions | MessagePayload): Promise<Message<InGuild>>;
|
||||
public equals(message: Message, rawData: unknown): boolean;
|
||||
public fetchReference(): Promise<Message>;
|
||||
public fetchReference(): Promise<Message<InGuild>>;
|
||||
public fetchWebhook(): Promise<Webhook>;
|
||||
public crosspost(): Promise<Message>;
|
||||
public fetch(force?: boolean): Promise<Message>;
|
||||
public pin(reason?: string): Promise<Message>;
|
||||
public crosspost(): Promise<Message<InGuild>>;
|
||||
public fetch(force?: boolean): Promise<Message<InGuild>>;
|
||||
public pin(reason?: string): Promise<Message<InGuild>>;
|
||||
public react(emoji: EmojiIdentifierResolvable): Promise<MessageReaction>;
|
||||
public removeAttachments(): Promise<Message>;
|
||||
public reply(options: string | MessagePayload | ReplyMessageOptions): Promise<Message>;
|
||||
public removeAttachments(): Promise<Message<InGuild>>;
|
||||
public reply(options: string | MessagePayload | ReplyMessageOptions): Promise<Message<InGuild>>;
|
||||
public resolveComponent(customId: string): MessageActionRowComponent | null;
|
||||
public startThread(options: StartThreadOptions): Promise<AnyThreadChannel>;
|
||||
public suppressEmbeds(suppress?: boolean): Promise<Message>;
|
||||
public suppressEmbeds(suppress?: boolean): Promise<Message<InGuild>>;
|
||||
public toJSON(): unknown;
|
||||
public toString(): string;
|
||||
public unpin(reason?: string): Promise<Message>;
|
||||
public unpin(reason?: string): Promise<Message<InGuild>>;
|
||||
public inGuild(): this is Message<true> & this;
|
||||
}
|
||||
|
||||
@@ -2506,7 +2507,11 @@ export interface PrivateThreadChannel extends ThreadChannel {
|
||||
type: ChannelType.GuildPrivateThread;
|
||||
}
|
||||
|
||||
export class ThreadChannel extends TextBasedChannelMixin(BaseChannel, ['fetchWebhooks', 'createWebhook', 'setNSFW']) {
|
||||
export class ThreadChannel extends TextBasedChannelMixin(BaseChannel, true, [
|
||||
'fetchWebhooks',
|
||||
'createWebhook',
|
||||
'setNSFW',
|
||||
]) {
|
||||
private constructor(guild: Guild, data?: RawThreadChannelData, client?: Client, fromInteraction?: boolean);
|
||||
public archived: boolean | null;
|
||||
public get archivedAt(): Date | null;
|
||||
@@ -2752,7 +2757,10 @@ export type ComponentData =
|
||||
| ModalActionRowComponentData
|
||||
| ActionRowData<MessageActionRowComponentData | ModalActionRowComponentData>;
|
||||
|
||||
export class VoiceChannel extends TextBasedChannelMixin(BaseGuildVoiceChannel, ['lastPinTimestamp', 'lastPinAt']) {
|
||||
export class VoiceChannel extends TextBasedChannelMixin(BaseGuildVoiceChannel, true, [
|
||||
'lastPinTimestamp',
|
||||
'lastPinAt',
|
||||
]) {
|
||||
public videoQualityMode: VideoQualityMode | null;
|
||||
public get speakable(): boolean;
|
||||
public type: ChannelType.GuildVoice;
|
||||
@@ -3518,15 +3526,22 @@ export class GuildMemberRoleManager extends DataManager<Snowflake, Role, RoleRes
|
||||
): Promise<GuildMember>;
|
||||
}
|
||||
|
||||
export class MessageManager extends CachedManager<Snowflake, Message, MessageResolvable> {
|
||||
export class MessageManager<InGuild extends boolean = boolean> extends CachedManager<
|
||||
Snowflake,
|
||||
Message<InGuild>,
|
||||
MessageResolvable
|
||||
> {
|
||||
private constructor(channel: TextBasedChannel, iterable?: Iterable<RawMessageData>);
|
||||
public channel: TextBasedChannel;
|
||||
public crosspost(message: MessageResolvable): Promise<Message>;
|
||||
public channel: If<InGuild, GuildTextBasedChannel, TextBasedChannel>;
|
||||
public crosspost(message: MessageResolvable): Promise<Message<InGuild>>;
|
||||
public delete(message: MessageResolvable): Promise<void>;
|
||||
public edit(message: MessageResolvable, options: string | MessagePayload | MessageEditOptions): Promise<Message>;
|
||||
public fetch(options: MessageResolvable | FetchMessageOptions): Promise<Message>;
|
||||
public fetch(options?: FetchMessagesOptions): Promise<Collection<Snowflake, Message>>;
|
||||
public fetchPinned(cache?: boolean): Promise<Collection<Snowflake, Message>>;
|
||||
public edit(
|
||||
message: MessageResolvable,
|
||||
options: string | MessagePayload | MessageEditOptions,
|
||||
): Promise<Message<InGuild>>;
|
||||
public fetch(options: MessageResolvable | FetchMessageOptions): Promise<Message<InGuild>>;
|
||||
public fetch(options?: FetchMessagesOptions): Promise<Collection<Snowflake, Message<InGuild>>>;
|
||||
public fetchPinned(cache?: boolean): Promise<Collection<Snowflake, Message<InGuild>>>;
|
||||
public react(message: MessageResolvable, emoji: EmojiIdentifierResolvable): Promise<void>;
|
||||
public pin(message: MessageResolvable, reason?: string): Promise<void>;
|
||||
public unpin(message: MessageResolvable, reason?: string): Promise<void>;
|
||||
@@ -3649,22 +3664,31 @@ export class VoiceStateManager extends CachedManager<Snowflake, VoiceState, type
|
||||
// to each of those classes
|
||||
|
||||
export type Constructable<T> = abstract new (...args: any[]) => T;
|
||||
export function PartialTextBasedChannel<T>(Base?: Constructable<T>): Constructable<T & PartialTextBasedChannelFields>;
|
||||
export function TextBasedChannelMixin<T, I extends keyof TextBasedChannelFields = never>(
|
||||
export function PartialTextBasedChannel<T>(
|
||||
Base?: Constructable<T>,
|
||||
ignore?: I[],
|
||||
): Constructable<T & Omit<TextBasedChannelFields, I>>;
|
||||
): Constructable<T & PartialTextBasedChannelFields<false>>;
|
||||
|
||||
export interface PartialTextBasedChannelFields {
|
||||
send(options: string | MessagePayload | MessageOptions): Promise<Message>;
|
||||
export function TextBasedChannelMixin<
|
||||
T,
|
||||
InGuild extends boolean = boolean,
|
||||
I extends keyof TextBasedChannelFields<InGuild> = never,
|
||||
>(
|
||||
Base?: Constructable<T>,
|
||||
inGuild?: InGuild,
|
||||
ignore?: I[],
|
||||
): Constructable<T & Omit<TextBasedChannelFields<InGuild>, I>>;
|
||||
|
||||
export interface PartialTextBasedChannelFields<InGuild extends boolean = boolean> {
|
||||
send(options: string | MessagePayload | MessageOptions): Promise<Message<InGuild>>;
|
||||
}
|
||||
|
||||
export interface TextBasedChannelFields extends PartialTextBasedChannelFields {
|
||||
export interface TextBasedChannelFields<InGuild extends boolean = boolean>
|
||||
extends PartialTextBasedChannelFields<InGuild> {
|
||||
lastMessageId: Snowflake | null;
|
||||
get lastMessage(): Message | null;
|
||||
lastPinTimestamp: number | null;
|
||||
get lastPinAt(): Date | null;
|
||||
messages: MessageManager;
|
||||
messages: MessageManager<InGuild>;
|
||||
awaitMessageComponent<T extends MessageComponentType>(
|
||||
options?: AwaitMessageCollectorOptionsParams<T, true>,
|
||||
): Promise<MappedInteractionTypes[T]>;
|
||||
@@ -5521,7 +5545,7 @@ export type Channel =
|
||||
| AnyThreadChannel
|
||||
| VoiceChannel;
|
||||
|
||||
export type TextBasedChannel = Extract<Channel, { messages: MessageManager }>;
|
||||
export type TextBasedChannel = Exclude<Extract<Channel, { type: TextChannelType }>, PartialGroupDMChannel>;
|
||||
|
||||
export type TextBasedChannelTypes = TextBasedChannel['type'];
|
||||
|
||||
|
||||
@@ -1049,11 +1049,11 @@ declare const user: User;
|
||||
declare const guildMember: GuildMember;
|
||||
|
||||
// Test whether the structures implement send
|
||||
expectType<TextBasedChannelFields['send']>(dmChannel.send);
|
||||
expectType<TextBasedChannelFields['send']>(threadChannel.send);
|
||||
expectType<TextBasedChannelFields['send']>(newsChannel.send);
|
||||
expectType<TextBasedChannelFields['send']>(textChannel.send);
|
||||
expectType<TextBasedChannelFields['send']>(voiceChannel.send);
|
||||
expectType<TextBasedChannelFields<false>['send']>(dmChannel.send);
|
||||
expectType<TextBasedChannelFields<true>['send']>(threadChannel.send);
|
||||
expectType<TextBasedChannelFields<true>['send']>(newsChannel.send);
|
||||
expectType<TextBasedChannelFields<true>['send']>(textChannel.send);
|
||||
expectType<TextBasedChannelFields<true>['send']>(voiceChannel.send);
|
||||
expectAssignable<PartialTextBasedChannelFields>(user);
|
||||
expectAssignable<PartialTextBasedChannelFields>(guildMember);
|
||||
|
||||
@@ -1190,6 +1190,34 @@ declare const guildChannelManager: GuildChannelManager;
|
||||
expectType<Promise<Collection<Snowflake, AnyChannel>>>(guildChannelManager.fetch());
|
||||
expectType<Promise<Collection<Snowflake, AnyChannel>>>(guildChannelManager.fetch(undefined, {}));
|
||||
expectType<Promise<AnyChannel | null>>(guildChannelManager.fetch('0'));
|
||||
|
||||
const channel = guildChannelManager.cache.first()!;
|
||||
|
||||
if (channel.isTextBased()) {
|
||||
const { messages } = channel;
|
||||
const message = await messages.fetch('123');
|
||||
expectType<MessageManager<true>>(messages);
|
||||
expectType<Promise<Message<true>>>(messages.crosspost('1234567890'));
|
||||
expectType<Promise<Message<true>>>(messages.edit('1234567890', 'text'));
|
||||
expectType<Promise<Message<true>>>(messages.fetch('1234567890'));
|
||||
expectType<Promise<Collection<Snowflake, Message<true>>>>(messages.fetchPinned());
|
||||
expectType<Guild>(message.guild);
|
||||
expectType<Snowflake>(message.guildId);
|
||||
expectType<GuildTextBasedChannel>(message.channel.messages.channel);
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
const { messages } = dmChannel;
|
||||
const message = await messages.fetch('123');
|
||||
expectType<MessageManager<false>>(messages);
|
||||
expectType<Promise<Message<false>>>(messages.crosspost('1234567890')); // This shouldn't even exist!
|
||||
expectType<Promise<Message<false>>>(messages.edit('1234567890', 'text'));
|
||||
expectType<Promise<Message<false>>>(messages.fetch('1234567890'));
|
||||
expectType<Promise<Collection<Snowflake, Message<false>>>>(messages.fetchPinned());
|
||||
expectType<null>(message.guild);
|
||||
expectType<null>(message.guildId);
|
||||
expectType<TextBasedChannel>(message.channel.messages.channel);
|
||||
}
|
||||
|
||||
declare const messageManager: MessageManager;
|
||||
|
||||
@@ -44,8 +44,8 @@
|
||||
},
|
||||
"homepage": "https://discord.js.org",
|
||||
"dependencies": {
|
||||
"@discordjs/proxy": "^1.0.0",
|
||||
"@discordjs/rest": "^1.0.0",
|
||||
"@discordjs/proxy": "^1.1.0",
|
||||
"@discordjs/rest": "^1.1.0",
|
||||
"tslib": "^2.4.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -2,41 +2,21 @@
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
# [@discordjs/proxy@1.1.0](https://github.com/discordjs/discord.js/tree/@discordjs/proxy@1.1.0) - (2022-08-22)
|
||||
# [@discordjs/proxy@1.1.0](https://github.com/discordjs/discord.js/compare/@discordjs/proxy@1.0.1...@discordjs/proxy@1.1.0) - (2022-08-22)
|
||||
|
||||
## Bug Fixes
|
||||
|
||||
- **proxyRequests:** Typo in error message (#8537) ([dd44e8b](https://github.com/discordjs/discord.js/commit/dd44e8b6ec141e630af4543bd3babcce39aa2887))
|
||||
- **proxy-container:** Proper deps (#8120) ([17867f9](https://github.com/discordjs/discord.js/commit/17867f9154d0dd16357f4ff29da641e23a33a9fa))
|
||||
- **proxy:** Add docs script ([a45bef4](https://github.com/discordjs/discord.js/commit/a45bef4cad77dac1a4138fd0d52b769ce09b5678))
|
||||
|
||||
## Documentation
|
||||
|
||||
- Add codecov coverage badge to readmes (#8226) ([f6db285](https://github.com/discordjs/discord.js/commit/f6db285c073898a749fe4591cbd4463d1896daf5))
|
||||
|
||||
## Features
|
||||
|
||||
- **website:** Show `constructor` information (#8540) ([e42fd16](https://github.com/discordjs/discord.js/commit/e42fd1636973b10dd7ed6fb4280ee1a4a8f82007))
|
||||
- Codecov (#8219) ([f10f4cd](https://github.com/discordjs/discord.js/commit/f10f4cdcd88ca6be7ec735ed3a415ba13da83db0))
|
||||
- Proxy container (#8000) ([2681929](https://github.com/discordjs/discord.js/commit/2681929e4263032ad34a99ecb42465c320b271ba))
|
||||
- **docgen:** Update typedoc ([b3346f4](https://github.com/discordjs/discord.js/commit/b3346f4b9b3d4f96443506643d4631dc1c6d7b21))
|
||||
- Website (#8043) ([127931d](https://github.com/discordjs/discord.js/commit/127931d1df7a2a5c27923c2f2151dbf3824e50cc))
|
||||
- **docgen:** Typescript support ([3279b40](https://github.com/discordjs/discord.js/commit/3279b40912e6aa61507bedb7db15a2b8668de44b))
|
||||
- Docgen package (#8029) ([8b979c0](https://github.com/discordjs/discord.js/commit/8b979c0245c42fd824d8e98745ee869f5360fc86))
|
||||
- Use vitest instead of jest for more speed ([8d8e6c0](https://github.com/discordjs/discord.js/commit/8d8e6c03decd7352a2aa180f6e5bc1a13602539b))
|
||||
- Add scripts package for locally used scripts ([f2ae1f9](https://github.com/discordjs/discord.js/commit/f2ae1f9348bfd893332a9060f71a8a5f272a1b8b))
|
||||
- @discordjs/proxy (#7925) ([1ba2d2a](https://github.com/discordjs/discord.js/commit/1ba2d2a898613e5fcc119a97dce935f4db91162c))
|
||||
|
||||
## Refactor
|
||||
|
||||
- Docs design (#8487) ([4ab1d09](https://github.com/discordjs/discord.js/commit/4ab1d09997a18879a9eb9bda39df6f15aa22557e))
|
||||
- Move all the config files to root (#8033) ([769ea0b](https://github.com/discordjs/discord.js/commit/769ea0bfe78c4f1d413c6b397c604ffe91e39c6a))
|
||||
|
||||
## Styling
|
||||
|
||||
- Cleanup tests and tsup configs ([6b8ef20](https://github.com/discordjs/discord.js/commit/6b8ef20cb3af5b5cfd176dd0aa0a1a1e98551629))
|
||||
|
||||
# [@discordjs/proxy@1.0.0](https://github.com/discordjs/discord.js/tree/@discordjs/proxy@1.1.0) - (2022-07-17)
|
||||
# [@discordjs/proxy@1.0.0](https://github.com/discordjs/discord.js/tree/@discordjs/proxy@1.0.0) - (2022-07-17)
|
||||
|
||||
## Bug Fixes
|
||||
|
||||
|
||||
@@ -1790,8 +1790,8 @@ __metadata:
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@discordjs/proxy-container@workspace:packages/proxy-container"
|
||||
dependencies:
|
||||
"@discordjs/proxy": ^1.0.0
|
||||
"@discordjs/rest": ^1.0.0
|
||||
"@discordjs/proxy": ^1.1.0
|
||||
"@discordjs/rest": ^1.1.0
|
||||
"@types/node": ^16.11.52
|
||||
"@typescript-eslint/eslint-plugin": ^5.33.1
|
||||
"@typescript-eslint/parser": ^5.33.1
|
||||
@@ -1808,7 +1808,7 @@ __metadata:
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
"@discordjs/proxy@^1.0.0, @discordjs/proxy@workspace:packages/proxy":
|
||||
"@discordjs/proxy@^1.1.0, @discordjs/proxy@workspace:packages/proxy":
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@discordjs/proxy@workspace:packages/proxy"
|
||||
dependencies:
|
||||
@@ -1838,7 +1838,7 @@ __metadata:
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
"@discordjs/rest@^1.0.0, @discordjs/rest@workspace:^, @discordjs/rest@workspace:packages/rest":
|
||||
"@discordjs/rest@^1.0.0, @discordjs/rest@^1.1.0, @discordjs/rest@workspace:^, @discordjs/rest@workspace:packages/rest":
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@discordjs/rest@workspace:packages/rest"
|
||||
dependencies:
|
||||
|
||||
Reference in New Issue
Block a user