Skip to content

Commit 5d6c555

Browse files
Merge branch 'main' into discord.js/rename-error
2 parents 466c9e7 + e745b95 commit 5d6c555

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+321
-251
lines changed

packages/actions/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"@vitest/coverage-c8": "^0.23.4",
4848
"cross-env": "^7.0.3",
4949
"eslint": "^8.24.0",
50-
"eslint-config-neon": "^0.1.33",
50+
"eslint-config-neon": "^0.1.34",
5151
"prettier": "^2.7.1",
5252
"tsup": "^6.2.3",
5353
"typescript": "^4.8.4",

packages/api-extractor-utils/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"@types/node": "^16.11.64",
3939
"cross-env": "^7.0.3",
4040
"eslint": "^8.24.0",
41-
"eslint-config-neon": "^0.1.33",
41+
"eslint-config-neon": "^0.1.34",
4242
"prettier": "^2.7.1",
4343
"tsup": "^6.2.3",
4444
"typescript": "^4.8.4"

packages/builders/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
"cross-env": "^7.0.3",
7070
"downlevel-dts": "^0.10.1",
7171
"eslint": "^8.24.0",
72-
"eslint-config-neon": "^0.1.33",
72+
"eslint-config-neon": "^0.1.34",
7373
"prettier": "^2.7.1",
7474
"tsup": "^6.2.3",
7575
"typescript": "^4.8.4",

packages/collection/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"cross-env": "^7.0.3",
5858
"downlevel-dts": "^0.10.1",
5959
"eslint": "^8.24.0",
60-
"eslint-config-neon": "^0.1.33",
60+
"eslint-config-neon": "^0.1.34",
6161
"prettier": "^2.7.1",
6262
"tsup": "^6.2.3",
6363
"typescript": "^4.8.4",

packages/discord.js/src/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,3 +186,4 @@ exports.WebSocket = require('./WebSocket');
186186
__exportStar(require('discord-api-types/v10'), exports);
187187
__exportStar(require('@discordjs/builders'), exports);
188188
__exportStar(require('@discordjs/rest'), exports);
189+
__exportStar(require('@discordjs/util'), exports);

packages/discord.js/src/managers/CategoryChannelChildManager.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ class CategoryChannelChildManager extends DataManager {
5353
* @property {GuildForumTagData[]} [availableTags] The tags that can be used in this channel (forum only).
5454
* @property {DefaultReactionEmoji} [defaultReactionEmoji]
5555
* The emoji to show in the add reaction button on a thread in a guild forum channel.
56+
* @property {ThreadAutoArchiveDuration} [defaultAutoArchiveDuration]
57+
* The default auto archive duration for all new threads in this channel
5658
* @property {SortOrderType} [defaultSortOrder] The default sort order mode used to order posts (forum only).
5759
* @property {string} [reason] Reason for creating the new channel
5860
*/

packages/discord.js/src/managers/GuildChannelManager.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ class GuildChannelManager extends CachedManager {
141141
videoQualityMode,
142142
availableTags,
143143
defaultReactionEmoji,
144+
defaultAutoArchiveDuration,
144145
defaultSortOrder,
145146
reason,
146147
}) {
@@ -163,6 +164,7 @@ class GuildChannelManager extends CachedManager {
163164
video_quality_mode: videoQualityMode,
164165
available_tags: availableTags?.map(availableTag => transformGuildForumTag(availableTag)),
165166
default_reaction_emoji: defaultReactionEmoji && transformGuildDefaultReaction(defaultReactionEmoji),
167+
default_auto_archive_duration: defaultAutoArchiveDuration,
166168
default_sort_order: defaultSortOrder,
167169
},
168170
reason,

packages/discord.js/src/structures/Message.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,9 @@ class Message extends Base {
541541
* @property {CollectorFilter} [filter] The filter applied to this collector
542542
* @property {number} [time] Time to wait for an interaction before rejecting
543543
* @property {ComponentType} [componentType] The type of component interaction to collect
544+
* @property {number} [idle] Time to wait without another message component interaction before ending the collector
545+
* @property {boolean} [dispose] Whether to remove the message component interaction after collecting
546+
* @property {InteractionResponse} [InteractionResponse] The interaction response to collect interactions from
544547
*/
545548

546549
/**

packages/discord.js/typings/index.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1750,7 +1750,7 @@ export class Message<InGuild extends boolean = boolean> extends Base {
17501750
public toJSON(): unknown;
17511751
public toString(): string;
17521752
public unpin(reason?: string): Promise<Message<InGuild>>;
1753-
public inGuild(): this is Message<true> & this;
1753+
public inGuild(): this is Message<true>;
17541754
}
17551755

17561756
export class AttachmentBuilder {
@@ -4252,6 +4252,7 @@ export interface CategoryCreateChannelOptions {
42524252
videoQualityMode?: VideoQualityMode;
42534253
availableTags?: GuildForumTagData[];
42544254
defaultReactionEmoji?: DefaultReactionEmoji;
4255+
defaultAutoArchiveDuration?: ThreadAutoArchiveDuration;
42554256
defaultSortOrder?: SortOrderType;
42564257
reason?: string;
42574258
}

packages/discord.js/typings/index.test-d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,11 @@ declare const assertIsMessage: (m: Promise<Message>) => void;
309309

310310
client.on('messageCreate', async message => {
311311
const { client, channel } = message;
312+
313+
if (!message.inGuild() && message.partial) {
314+
expectNotType<never>(message);
315+
}
316+
312317
expectType<Client<true>>(client);
313318
assertIsMessage(channel.send('string'));
314319
assertIsMessage(channel.send({}));

0 commit comments

Comments
 (0)