oceanic.js 1.10.1-dev.97cef9c → 1.10.1-dev.9b37972
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/package.json +5 -5
- package/esm.mjs +2 -0
- package/package.json +5 -5
- package/dist/lib/Client.d.ts +0 -91
- package/dist/lib/Client.js +0 -254
- package/dist/lib/Constants.d.ts +0 -1121
- package/dist/lib/Constants.js +0 -1401
- package/dist/lib/gateway/Shard.d.ts +0 -77
- package/dist/lib/gateway/Shard.js +0 -1582
- package/dist/lib/gateway/ShardManager.d.ts +0 -26
- package/dist/lib/gateway/ShardManager.js +0 -304
- package/dist/lib/index.d.ts +0 -83
- package/dist/lib/index.js +0 -166
- package/dist/lib/rest/Bucket.d.ts +0 -33
- package/dist/lib/rest/Bucket.js +0 -78
- package/dist/lib/rest/DiscordHTTPError.d.ts +0 -16
- package/dist/lib/rest/DiscordHTTPError.js +0 -65
- package/dist/lib/rest/DiscordRESTError.d.ts +0 -19
- package/dist/lib/rest/DiscordRESTError.js +0 -89
- package/dist/lib/rest/OAuthHelper.d.ts +0 -60
- package/dist/lib/rest/OAuthHelper.js +0 -180
- package/dist/lib/rest/RESTManager.d.ts +0 -42
- package/dist/lib/rest/RESTManager.js +0 -82
- package/dist/lib/rest/RequestHandler.d.ts +0 -28
- package/dist/lib/rest/RequestHandler.js +0 -313
- package/dist/lib/rest/SequentialBucket.d.ts +0 -25
- package/dist/lib/rest/SequentialBucket.js +0 -76
- package/dist/lib/routes/Applications.d.ts +0 -171
- package/dist/lib/routes/Applications.js +0 -447
- package/dist/lib/routes/Channels.d.ts +0 -391
- package/dist/lib/routes/Channels.js +0 -1107
- package/dist/lib/routes/Guilds.d.ts +0 -606
- package/dist/lib/routes/Guilds.js +0 -1669
- package/dist/lib/routes/Interactions.d.ts +0 -74
- package/dist/lib/routes/Interactions.js +0 -141
- package/dist/lib/routes/Miscellaneous.d.ts +0 -25
- package/dist/lib/routes/Miscellaneous.js +0 -54
- package/dist/lib/routes/OAuth.d.ts +0 -105
- package/dist/lib/routes/OAuth.js +0 -309
- package/dist/lib/routes/Users.d.ts +0 -32
- package/dist/lib/routes/Users.js +0 -59
- package/dist/lib/routes/Webhooks.d.ts +0 -128
- package/dist/lib/routes/Webhooks.js +0 -264
- package/dist/lib/structures/AnnouncementChannel.d.ts +0 -36
- package/dist/lib/structures/AnnouncementChannel.js +0 -47
- package/dist/lib/structures/AnnouncementThreadChannel.d.ts +0 -18
- package/dist/lib/structures/AnnouncementThreadChannel.js +0 -27
- package/dist/lib/structures/Application.d.ts +0 -68
- package/dist/lib/structures/Application.js +0 -178
- package/dist/lib/structures/ApplicationCommand.d.ts +0 -74
- package/dist/lib/structures/ApplicationCommand.js +0 -141
- package/dist/lib/structures/Attachment.d.ts +0 -34
- package/dist/lib/structures/Attachment.js +0 -64
- package/dist/lib/structures/AuditLogEntry.d.ts +0 -25
- package/dist/lib/structures/AuditLogEntry.js +0 -53
- package/dist/lib/structures/AutoModerationRule.d.ts +0 -49
- package/dist/lib/structures/AutoModerationRule.js +0 -139
- package/dist/lib/structures/AutocompleteInteraction.d.ts +0 -62
- package/dist/lib/structures/AutocompleteInteraction.js +0 -115
- package/dist/lib/structures/Base.d.ts +0 -20
- package/dist/lib/structures/Base.js +0 -58
- package/dist/lib/structures/BaseEntitlement.d.ts +0 -19
- package/dist/lib/structures/BaseEntitlement.js +0 -44
- package/dist/lib/structures/CategoryChannel.d.ts +0 -41
- package/dist/lib/structures/CategoryChannel.js +0 -105
- package/dist/lib/structures/Channel.d.ts +0 -20
- package/dist/lib/structures/Channel.js +0 -91
- package/dist/lib/structures/ClientApplication.d.ts +0 -153
- package/dist/lib/structures/ClientApplication.js +0 -220
- package/dist/lib/structures/CommandInteraction.d.ts +0 -127
- package/dist/lib/structures/CommandInteraction.js +0 -297
- package/dist/lib/structures/ComponentInteraction.d.ts +0 -137
- package/dist/lib/structures/ComponentInteraction.js +0 -311
- package/dist/lib/structures/Entitlement.d.ts +0 -12
- package/dist/lib/structures/Entitlement.js +0 -26
- package/dist/lib/structures/ExtendedUser.d.ts +0 -26
- package/dist/lib/structures/ExtendedUser.js +0 -57
- package/dist/lib/structures/ForumChannel.d.ts +0 -11
- package/dist/lib/structures/ForumChannel.js +0 -19
- package/dist/lib/structures/GroupChannel.d.ts +0 -62
- package/dist/lib/structures/GroupChannel.js +0 -133
- package/dist/lib/structures/Guild.d.ts +0 -654
- package/dist/lib/structures/Guild.js +0 -1319
- package/dist/lib/structures/GuildChannel.d.ts +0 -34
- package/dist/lib/structures/GuildChannel.js +0 -75
- package/dist/lib/structures/GuildPreview.d.ts +0 -50
- package/dist/lib/structures/GuildPreview.js +0 -119
- package/dist/lib/structures/GuildScheduledEvent.d.ts +0 -60
- package/dist/lib/structures/GuildScheduledEvent.js +0 -154
- package/dist/lib/structures/GuildTemplate.d.ts +0 -55
- package/dist/lib/structures/GuildTemplate.js +0 -126
- package/dist/lib/structures/Integration.d.ts +0 -54
- package/dist/lib/structures/Integration.js +0 -156
- package/dist/lib/structures/Interaction.d.ts +0 -40
- package/dist/lib/structures/Interaction.js +0 -91
- package/dist/lib/structures/InteractionResolvedChannel.d.ts +0 -28
- package/dist/lib/structures/InteractionResolvedChannel.js +0 -45
- package/dist/lib/structures/Invite.d.ts +0 -64
- package/dist/lib/structures/Invite.js +0 -193
- package/dist/lib/structures/InviteGuild.d.ts +0 -52
- package/dist/lib/structures/InviteGuild.js +0 -88
- package/dist/lib/structures/MediaChannel.d.ts +0 -11
- package/dist/lib/structures/MediaChannel.js +0 -19
- package/dist/lib/structures/Member.d.ts +0 -122
- package/dist/lib/structures/Member.js +0 -255
- package/dist/lib/structures/Message.d.ts +0 -183
- package/dist/lib/structures/Message.js +0 -455
- package/dist/lib/structures/ModalSubmitInteraction.d.ts +0 -128
- package/dist/lib/structures/ModalSubmitInteraction.js +0 -240
- package/dist/lib/structures/OAuthApplication.d.ts +0 -79
- package/dist/lib/structures/OAuthApplication.js +0 -210
- package/dist/lib/structures/OAuthGuild.d.ts +0 -35
- package/dist/lib/structures/OAuthGuild.js +0 -61
- package/dist/lib/structures/PartialApplication.d.ts +0 -30
- package/dist/lib/structures/PartialApplication.js +0 -67
- package/dist/lib/structures/Permission.d.ts +0 -21
- package/dist/lib/structures/Permission.js +0 -68
- package/dist/lib/structures/PermissionOverwrite.d.ts +0 -26
- package/dist/lib/structures/PermissionOverwrite.js +0 -49
- package/dist/lib/structures/PingInteraction.d.ts +0 -16
- package/dist/lib/structures/PingInteraction.js +0 -26
- package/dist/lib/structures/PrivateChannel.d.ts +0 -90
- package/dist/lib/structures/PrivateChannel.js +0 -131
- package/dist/lib/structures/PrivateThreadChannel.d.ts +0 -18
- package/dist/lib/structures/PrivateThreadChannel.js +0 -27
- package/dist/lib/structures/PublicThreadChannel.d.ts +0 -21
- package/dist/lib/structures/PublicThreadChannel.js +0 -37
- package/dist/lib/structures/Role.d.ts +0 -50
- package/dist/lib/structures/Role.js +0 -131
- package/dist/lib/structures/SKU.d.ts +0 -32
- package/dist/lib/structures/SKU.js +0 -53
- package/dist/lib/structures/StageChannel.d.ts +0 -33
- package/dist/lib/structures/StageChannel.js +0 -44
- package/dist/lib/structures/StageInstance.d.ts +0 -36
- package/dist/lib/structures/StageInstance.js +0 -94
- package/dist/lib/structures/Team.d.ts +0 -22
- package/dist/lib/structures/Team.js +0 -67
- package/dist/lib/structures/TestEntitlement.d.ts +0 -10
- package/dist/lib/structures/TestEntitlement.js +0 -21
- package/dist/lib/structures/TextChannel.d.ts +0 -34
- package/dist/lib/structures/TextChannel.js +0 -46
- package/dist/lib/structures/TextableChannel.d.ts +0 -158
- package/dist/lib/structures/TextableChannel.js +0 -276
- package/dist/lib/structures/TextableVoiceChannel.d.ts +0 -39
- package/dist/lib/structures/TextableVoiceChannel.js +0 -81
- package/dist/lib/structures/ThreadChannel.d.ts +0 -159
- package/dist/lib/structures/ThreadChannel.js +0 -295
- package/dist/lib/structures/ThreadOnlyChannel.d.ts +0 -99
- package/dist/lib/structures/ThreadOnlyChannel.js +0 -233
- package/dist/lib/structures/ThreadableChannel.d.ts +0 -36
- package/dist/lib/structures/ThreadableChannel.js +0 -58
- package/dist/lib/structures/UnavailableGuild.d.ts +0 -11
- package/dist/lib/structures/UnavailableGuild.js +0 -21
- package/dist/lib/structures/User.d.ts +0 -82
- package/dist/lib/structures/User.js +0 -168
- package/dist/lib/structures/VoiceChannel.d.ts +0 -20
- package/dist/lib/structures/VoiceChannel.js +0 -35
- package/dist/lib/structures/VoiceState.d.ts +0 -51
- package/dist/lib/structures/VoiceState.js +0 -140
- package/dist/lib/structures/Webhook.d.ts +0 -129
- package/dist/lib/structures/Webhook.js +0 -206
- package/dist/lib/types/applications.d.ts +0 -448
- package/dist/lib/types/audit-log.d.ts +0 -121
- package/dist/lib/types/auto-moderation.d.ts +0 -99
- package/dist/lib/types/channels.d.ts +0 -1150
- package/dist/lib/types/client.d.ts +0 -228
- package/dist/lib/types/events.d.ts +0 -260
- package/dist/lib/types/gateway-raw.d.ts +0 -567
- package/dist/lib/types/gateway.d.ts +0 -338
- package/dist/lib/types/guild-template.d.ts +0 -33
- package/dist/lib/types/guilds.d.ts +0 -854
- package/dist/lib/types/index.d.ts +0 -18
- package/dist/lib/types/interactions.d.ts +0 -376
- package/dist/lib/types/json.d.ts +0 -709
- package/dist/lib/types/misc.d.ts +0 -13
- package/dist/lib/types/oauth.d.ts +0 -201
- package/dist/lib/types/request-handler.d.ts +0 -52
- package/dist/lib/types/scheduled-events.d.ts +0 -88
- package/dist/lib/types/shared.d.ts +0 -9
- package/dist/lib/types/users.d.ts +0 -45
- package/dist/lib/types/voice.d.ts +0 -45
- package/dist/lib/types/webhooks.d.ts +0 -73
- package/dist/lib/util/Collection.d.ts +0 -47
- package/dist/lib/util/Collection.js +0 -78
- package/dist/lib/util/Errors.d.ts +0 -29
- package/dist/lib/util/Errors.js +0 -56
- package/dist/lib/util/Routes.d.ts +0 -124
- package/dist/lib/util/Routes.js +0 -243
- package/dist/lib/util/SimpleCollection.d.ts +0 -12
- package/dist/lib/util/SimpleCollection.js +0 -81
- package/dist/lib/util/TypedCollection.d.ts +0 -24
- package/dist/lib/util/TypedCollection.js +0 -76
- package/dist/lib/util/TypedEmitter.d.ts +0 -19
- package/dist/lib/util/TypedEmitter.js +0 -19
- package/dist/lib/util/Util.d.ts +0 -52
- package/dist/lib/util/Util.js +0 -469
- package/dist/lib/util/interactions/InteractionOptionsWrapper.d.ts +0 -170
- package/dist/lib/util/interactions/InteractionOptionsWrapper.js +0 -213
- package/dist/lib/util/interactions/MessageInteractionResponse.d.ts +0 -24
- package/dist/lib/util/interactions/MessageInteractionResponse.js +0 -28
- package/dist/lib/util/interactions/ModalSubmitInteractionComponentsWrapper.d.ts +0 -24
- package/dist/lib/util/interactions/ModalSubmitInteractionComponentsWrapper.js +0 -34
- package/dist/lib/util/interactions/SelectMenuValuesWrapper.d.ts +0 -60
- package/dist/lib/util/interactions/SelectMenuValuesWrapper.js +0 -124
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import BaseEntitlement from "./BaseEntitlement";
|
|
2
|
-
import type Client from "../Client";
|
|
3
|
-
import type { JSONTestEntitlement, RawTestEntitlement } from "../types";
|
|
4
|
-
/** Represents a test entitlement. */
|
|
5
|
-
export default class TestEntitlement extends BaseEntitlement {
|
|
6
|
-
constructor(data: RawTestEntitlement, client: Client);
|
|
7
|
-
/** Delete this entitlement. */
|
|
8
|
-
delete(): Promise<void>;
|
|
9
|
-
toJSON(): JSONTestEntitlement;
|
|
10
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const BaseEntitlement_1 = tslib_1.__importDefault(require("./BaseEntitlement"));
|
|
5
|
-
/** Represents a test entitlement. */
|
|
6
|
-
class TestEntitlement extends BaseEntitlement_1.default {
|
|
7
|
-
constructor(data, client) {
|
|
8
|
-
super(data, client);
|
|
9
|
-
}
|
|
10
|
-
/** Delete this entitlement. */
|
|
11
|
-
async delete() {
|
|
12
|
-
return this.client.rest.applications.deleteTestEntitlement(this.applicationID, this.id);
|
|
13
|
-
}
|
|
14
|
-
toJSON() {
|
|
15
|
-
return {
|
|
16
|
-
...super.toJSON()
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
exports.default = TestEntitlement;
|
|
21
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVGVzdEVudGl0bGVtZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vbGliL3N0cnVjdHVyZXMvVGVzdEVudGl0bGVtZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLGdGQUFnRDtBQUloRCxxQ0FBcUM7QUFDckMsTUFBcUIsZUFBZ0IsU0FBUSx5QkFBZTtJQUN4RCxZQUFZLElBQXdCLEVBQUUsTUFBYztRQUNoRCxLQUFLLENBQUMsSUFBSSxFQUFFLE1BQU0sQ0FBQyxDQUFDO0lBQ3hCLENBQUM7SUFFRCwrQkFBK0I7SUFDL0IsS0FBSyxDQUFDLE1BQU07UUFDUixPQUFPLElBQUksQ0FBQyxNQUFNLENBQUMsSUFBSSxDQUFDLFlBQVksQ0FBQyxxQkFBcUIsQ0FBQyxJQUFJLENBQUMsYUFBYSxFQUFFLElBQUksQ0FBQyxFQUFFLENBQUMsQ0FBQztJQUM1RixDQUFDO0lBRVEsTUFBTTtRQUNYLE9BQU87WUFDSCxHQUFHLEtBQUssQ0FBQyxNQUFNLEVBQUU7U0FDcEIsQ0FBQztJQUNOLENBQUM7Q0FDSjtBQWZELGtDQWVDIn0=
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/** @module TextChannel */
|
|
2
|
-
import type AnnouncementChannel from "./AnnouncementChannel";
|
|
3
|
-
import type PublicThreadChannel from "./PublicThreadChannel";
|
|
4
|
-
import type PrivateThreadChannel from "./PrivateThreadChannel";
|
|
5
|
-
import ThreadableChannel from "./ThreadableChannel";
|
|
6
|
-
import { ChannelTypes } from "../Constants";
|
|
7
|
-
import type Client from "../Client";
|
|
8
|
-
import type { ArchivedThreads, FollowedChannel, GetArchivedThreadsOptions, RawTextChannel } from "../types/channels";
|
|
9
|
-
import type { JSONTextChannel } from "../types/json";
|
|
10
|
-
/** Represents a guild text channel. */
|
|
11
|
-
export default class TextChannel extends ThreadableChannel<TextChannel, PublicThreadChannel | PrivateThreadChannel> {
|
|
12
|
-
type: ChannelTypes.GUILD_TEXT;
|
|
13
|
-
constructor(data: RawTextChannel, client: Client);
|
|
14
|
-
/**
|
|
15
|
-
* Convert this text channel to a announcement channel.
|
|
16
|
-
*/
|
|
17
|
-
convert(): Promise<AnnouncementChannel>;
|
|
18
|
-
/**
|
|
19
|
-
* Follow an announcement channel to this channel.
|
|
20
|
-
* @param webhookChannelID The ID of the channel to follow the announcement channel to.
|
|
21
|
-
*/
|
|
22
|
-
followAnnouncement(webhookChannelID: string): Promise<FollowedChannel>;
|
|
23
|
-
/**
|
|
24
|
-
* Get the private archived threads the current user has joined in this channel.
|
|
25
|
-
* @param options The options for getting the joined private archived threads.
|
|
26
|
-
*/
|
|
27
|
-
getJoinedPrivateArchivedThreads(options?: GetArchivedThreadsOptions): Promise<ArchivedThreads<PrivateThreadChannel>>;
|
|
28
|
-
/**
|
|
29
|
-
* Get the private archived threads in this channel.
|
|
30
|
-
* @param options The options for getting the private archived threads.
|
|
31
|
-
*/
|
|
32
|
-
getPrivateArchivedThreads(options?: GetArchivedThreadsOptions): Promise<ArchivedThreads<PrivateThreadChannel>>;
|
|
33
|
-
toJSON(): JSONTextChannel;
|
|
34
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
const ThreadableChannel_1 = tslib_1.__importDefault(require("./ThreadableChannel"));
|
|
5
|
-
const Constants_1 = require("../Constants");
|
|
6
|
-
/** Represents a guild text channel. */
|
|
7
|
-
class TextChannel extends ThreadableChannel_1.default {
|
|
8
|
-
constructor(data, client) {
|
|
9
|
-
super(data, client);
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Convert this text channel to a announcement channel.
|
|
13
|
-
*/
|
|
14
|
-
async convert() {
|
|
15
|
-
return this.client.rest.channels.edit(this.id, { type: Constants_1.ChannelTypes.GUILD_ANNOUNCEMENT });
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Follow an announcement channel to this channel.
|
|
19
|
-
* @param webhookChannelID The ID of the channel to follow the announcement channel to.
|
|
20
|
-
*/
|
|
21
|
-
async followAnnouncement(webhookChannelID) {
|
|
22
|
-
return this.client.rest.channels.followAnnouncement(this.id, webhookChannelID);
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Get the private archived threads the current user has joined in this channel.
|
|
26
|
-
* @param options The options for getting the joined private archived threads.
|
|
27
|
-
*/
|
|
28
|
-
async getJoinedPrivateArchivedThreads(options) {
|
|
29
|
-
return this.client.rest.channels.getJoinedPrivateArchivedThreads(this.id, options);
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Get the private archived threads in this channel.
|
|
33
|
-
* @param options The options for getting the private archived threads.
|
|
34
|
-
*/
|
|
35
|
-
async getPrivateArchivedThreads(options) {
|
|
36
|
-
return this.client.rest.channels.getPrivateArchivedThreads(this.id, options);
|
|
37
|
-
}
|
|
38
|
-
toJSON() {
|
|
39
|
-
return {
|
|
40
|
-
...super.toJSON(),
|
|
41
|
-
type: this.type
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
exports.default = TextChannel;
|
|
46
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVGV4dENoYW5uZWwuan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BQU0sQ0FBQyxJQUFJLENBQUMsUUFBUSxDQUFDLHlCQUF5QixDQUFDLElBQUksQ0FBQyxFQUFFLEVBQUUsT0FBTyxDQUFDLENBQUM7SUFDakYsQ0FBQztJQUVRLE1BQU07UUFDWCxPQUFPO1lBQ0gsR0FBRyxLQUFLLENBQUMsTUFBTSxFQUFFO1lBQ2pCLElBQUksRUFBRSxJQUFJLENBQUMsSUFBSTtTQUNsQixDQUFDO0lBQ04sQ0FBQztDQUNKO0FBM0NELDhCQTJDQyJ9
|
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
/** @module TextableChannel */
|
|
2
|
-
import GuildChannel from "./GuildChannel";
|
|
3
|
-
import PermissionOverwrite from "./PermissionOverwrite";
|
|
4
|
-
import Message from "./Message";
|
|
5
|
-
import type Invite from "./Invite";
|
|
6
|
-
import type CategoryChannel from "./CategoryChannel";
|
|
7
|
-
import type Member from "./Member";
|
|
8
|
-
import Permission from "./Permission";
|
|
9
|
-
import type User from "./User";
|
|
10
|
-
import type Webhook from "./Webhook";
|
|
11
|
-
import type Client from "../Client";
|
|
12
|
-
import TypedCollection from "../util/TypedCollection";
|
|
13
|
-
import type { CreateInviteOptions, CreateMessageOptions, EditMessageOptions, EditPermissionOptions, GetChannelMessagesOptions, GetReactionsOptions, RawMessage, RawAnnouncementChannel, RawOverwrite, RawTextChannel, PurgeOptions } from "../types/channels";
|
|
14
|
-
import type { JSONTextableChannel } from "../types/json";
|
|
15
|
-
import type { AnyTextableGuildChannel, CreateWebhookOptions, RawStageChannel, RawVoiceChannel } from "../types";
|
|
16
|
-
/** Represents a guild textable channel. */
|
|
17
|
-
export default class TextableChannel<T extends AnyTextableGuildChannel = AnyTextableGuildChannel> extends GuildChannel {
|
|
18
|
-
/** The last message sent in this channel. This will only be present if a message has been sent within the current session. */
|
|
19
|
-
lastMessage?: Message<T> | null;
|
|
20
|
-
/** The ID of last message sent in this channel. */
|
|
21
|
-
lastMessageID: string | null;
|
|
22
|
-
/** The cached messages in this channel. */
|
|
23
|
-
messages: TypedCollection<RawMessage, Message<T>>;
|
|
24
|
-
/** If this channel is age gated. */
|
|
25
|
-
nsfw: boolean;
|
|
26
|
-
/** The permission overwrites of this channel. */
|
|
27
|
-
permissionOverwrites: TypedCollection<RawOverwrite, PermissionOverwrite>;
|
|
28
|
-
/** The position of this channel on the sidebar. */
|
|
29
|
-
position: number;
|
|
30
|
-
/** The amount of seconds between non-moderators sending messages. */
|
|
31
|
-
rateLimitPerUser: number;
|
|
32
|
-
/** The topic of the channel. */
|
|
33
|
-
topic: string | null;
|
|
34
|
-
type: T["type"];
|
|
35
|
-
constructor(data: RawTextChannel | RawAnnouncementChannel | RawVoiceChannel | RawStageChannel, client: Client);
|
|
36
|
-
protected update(data: Partial<RawTextChannel | RawAnnouncementChannel | RawVoiceChannel | RawStageChannel>): void;
|
|
37
|
-
get parent(): CategoryChannel | undefined | null;
|
|
38
|
-
/**
|
|
39
|
-
* Create an invite for this channel. If the guild is not a `COMMUNITY` server, invites can only be made to last 30 days.
|
|
40
|
-
* @param options The options for the invite.
|
|
41
|
-
*/
|
|
42
|
-
createInvite(options: CreateInviteOptions): Promise<Invite<"withMetadata", T>>;
|
|
43
|
-
/**
|
|
44
|
-
* Create a message in this channel.
|
|
45
|
-
* @param options The options for the message.
|
|
46
|
-
*/
|
|
47
|
-
createMessage(options: CreateMessageOptions): Promise<Message<T>>;
|
|
48
|
-
/**
|
|
49
|
-
* Add a reaction to a message in this channel.
|
|
50
|
-
* @param messageID The ID of the message to add a reaction to.
|
|
51
|
-
* @param emoji The reaction to add to the message. `name:id` for custom emojis, and the unicode codepoint for default emojis.
|
|
52
|
-
*/
|
|
53
|
-
createReaction(messageID: string, emoji: string): Promise<void>;
|
|
54
|
-
/**
|
|
55
|
-
* Create a webhook in this channel.
|
|
56
|
-
* @param options The options to create the webhook with.
|
|
57
|
-
*/
|
|
58
|
-
createWebhook(options: CreateWebhookOptions): Promise<Webhook>;
|
|
59
|
-
/**
|
|
60
|
-
* Delete a message in this channel.
|
|
61
|
-
* @param messageID The ID of the message to delete.
|
|
62
|
-
* @param reason The reason for deleting the message.
|
|
63
|
-
*/
|
|
64
|
-
deleteMessage(messageID: string, reason?: string): Promise<void>;
|
|
65
|
-
/**
|
|
66
|
-
* Bulk delete messages in this channel.
|
|
67
|
-
* @param messageIDs The IDs of the messages to delete. Any duplicates or messages older than two weeks will cause an error.
|
|
68
|
-
* @param reason The reason for deleting the messages.
|
|
69
|
-
*/
|
|
70
|
-
deleteMessages(messageIDs: Array<string>, reason?: string): Promise<number>;
|
|
71
|
-
/**
|
|
72
|
-
* Delete a permission overwrite on this channel.
|
|
73
|
-
* @param overwriteID The ID of the permission overwrite to delete.
|
|
74
|
-
* @param reason The reason for deleting the permission overwrite.
|
|
75
|
-
*/
|
|
76
|
-
deletePermission(overwriteID: string, reason?: string): Promise<void>;
|
|
77
|
-
/**
|
|
78
|
-
* Remove a reaction from a message in this channel.
|
|
79
|
-
* @param messageID The ID of the message to remove a reaction from.
|
|
80
|
-
* @param emoji The reaction to remove from the message. `name:id` for custom emojis, and the unicode codepoint for default emojis.
|
|
81
|
-
* @param user The user to remove the reaction from, `@me` for the current user (default).
|
|
82
|
-
*/
|
|
83
|
-
deleteReaction(messageID: string, emoji: string, user?: string): Promise<void>;
|
|
84
|
-
/**
|
|
85
|
-
* Remove all, or a specific emoji's reactions from a message in this channel.
|
|
86
|
-
* @param messageID The ID of the message to remove reactions from.
|
|
87
|
-
* @param emoji The reaction to remove from the message. `name:id` for custom emojis, and the unicode codepoint for default emojis. Omit to remove all reactions.
|
|
88
|
-
*/
|
|
89
|
-
deleteReactions(messageID: string, emoji?: string): Promise<void>;
|
|
90
|
-
/**
|
|
91
|
-
* Edit a message in this channel.
|
|
92
|
-
* @param messageID The ID of the message to edit.
|
|
93
|
-
* @param options The options for editing the message.
|
|
94
|
-
*/
|
|
95
|
-
editMessage(messageID: string, options: EditMessageOptions): Promise<Message<T>>;
|
|
96
|
-
/**
|
|
97
|
-
* Edit a permission overwrite on this channel.
|
|
98
|
-
* @param overwriteID The ID of the permission overwrite to edit.
|
|
99
|
-
* @param options The options for editing the permission overwrite.
|
|
100
|
-
*/
|
|
101
|
-
editPermission(overwriteID: string, options: EditPermissionOptions): Promise<void>;
|
|
102
|
-
/**
|
|
103
|
-
* Get the invites of this channel.
|
|
104
|
-
*/
|
|
105
|
-
getInvites(): Promise<Array<Invite<"withMetadata", T>>>;
|
|
106
|
-
/**
|
|
107
|
-
* Get a message in this channel.
|
|
108
|
-
* @param messageID The ID of the message to get.
|
|
109
|
-
*/
|
|
110
|
-
getMessage(messageID: string): Promise<Message<T>>;
|
|
111
|
-
/**
|
|
112
|
-
* Get messages in this channel.
|
|
113
|
-
* @param options The options for getting the messages. `before`, `after`, and `around `All are mutually exclusive.
|
|
114
|
-
*/
|
|
115
|
-
getMessages(options?: GetChannelMessagesOptions): Promise<Array<Message<T>>>;
|
|
116
|
-
/**
|
|
117
|
-
* Get the pinned messages in this channel.
|
|
118
|
-
*/
|
|
119
|
-
getPinnedMessages(): Promise<Array<Message<T>>>;
|
|
120
|
-
/**
|
|
121
|
-
* Get the users who reacted with a specific emoji on a message in this channel.
|
|
122
|
-
* @param messageID The ID of the message to get reactions from.
|
|
123
|
-
* @param emoji The reaction to remove from the message. `name:id` for custom emojis, and the unicode codepoint for default emojis.
|
|
124
|
-
* @param options The options for getting the reactions.
|
|
125
|
-
*/
|
|
126
|
-
getReactions(messageID: string, emoji: string, options?: GetReactionsOptions): Promise<Array<User>>;
|
|
127
|
-
/**
|
|
128
|
-
* Get the webhooks in this channel.
|
|
129
|
-
*/
|
|
130
|
-
getWebhooks(): Promise<Array<Webhook>>;
|
|
131
|
-
/**
|
|
132
|
-
* Get the permissions of a member. If providing an id, the member must be cached.
|
|
133
|
-
* @param member The member to get the permissions of.
|
|
134
|
-
*/
|
|
135
|
-
permissionsOf(member: string | Member): Permission;
|
|
136
|
-
/**
|
|
137
|
-
* Pin a message in this channel.
|
|
138
|
-
* @param messageID The ID of the message to pin.
|
|
139
|
-
* @param reason The reason for pinning the message.
|
|
140
|
-
*/
|
|
141
|
-
pinMessage(messageID: string, reason?: string): Promise<void>;
|
|
142
|
-
/**
|
|
143
|
-
* Purge an amount of messages from this channel.
|
|
144
|
-
* @param options The options to purge. `before`, `after`, and `around `All are mutually exclusive.
|
|
145
|
-
*/
|
|
146
|
-
purge(options: PurgeOptions<T>): Promise<number>;
|
|
147
|
-
/**
|
|
148
|
-
* Show a typing indicator in this channel. How long users see this varies from client to client.
|
|
149
|
-
*/
|
|
150
|
-
sendTyping(): Promise<void>;
|
|
151
|
-
toJSON(): JSONTextableChannel;
|
|
152
|
-
/**
|
|
153
|
-
* Unpin a message in this channel.
|
|
154
|
-
* @param messageID The ID of the message to unpin.
|
|
155
|
-
* @param reason The reason for unpinning the message.
|
|
156
|
-
*/
|
|
157
|
-
unpinMessage(messageID: string, reason?: string): Promise<void>;
|
|
158
|
-
}
|
|
@@ -1,276 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
/** @module TextableChannel */
|
|
5
|
-
const GuildChannel_1 = tslib_1.__importDefault(require("./GuildChannel"));
|
|
6
|
-
const PermissionOverwrite_1 = tslib_1.__importDefault(require("./PermissionOverwrite"));
|
|
7
|
-
const Message_1 = tslib_1.__importDefault(require("./Message"));
|
|
8
|
-
const Permission_1 = tslib_1.__importDefault(require("./Permission"));
|
|
9
|
-
const Constants_1 = require("../Constants");
|
|
10
|
-
const TypedCollection_1 = tslib_1.__importDefault(require("../util/TypedCollection"));
|
|
11
|
-
const Errors_1 = require("../util/Errors");
|
|
12
|
-
/** Represents a guild textable channel. */
|
|
13
|
-
class TextableChannel extends GuildChannel_1.default {
|
|
14
|
-
/** The last message sent in this channel. This will only be present if a message has been sent within the current session. */
|
|
15
|
-
lastMessage;
|
|
16
|
-
/** The ID of last message sent in this channel. */
|
|
17
|
-
lastMessageID;
|
|
18
|
-
/** The cached messages in this channel. */
|
|
19
|
-
messages;
|
|
20
|
-
/** If this channel is age gated. */
|
|
21
|
-
nsfw;
|
|
22
|
-
/** The permission overwrites of this channel. */
|
|
23
|
-
permissionOverwrites;
|
|
24
|
-
/** The position of this channel on the sidebar. */
|
|
25
|
-
position;
|
|
26
|
-
/** The amount of seconds between non-moderators sending messages. */
|
|
27
|
-
rateLimitPerUser;
|
|
28
|
-
/** The topic of the channel. */
|
|
29
|
-
topic;
|
|
30
|
-
constructor(data, client) {
|
|
31
|
-
super(data, client);
|
|
32
|
-
this.lastMessageID = data.last_message_id;
|
|
33
|
-
this.messages = new TypedCollection_1.default((Message_1.default), client, this.client.util._getLimit("messages", this.id));
|
|
34
|
-
this.nsfw = data.nsfw;
|
|
35
|
-
this.permissionOverwrites = new TypedCollection_1.default(PermissionOverwrite_1.default, client);
|
|
36
|
-
this.position = data.position;
|
|
37
|
-
this.rateLimitPerUser = data.rate_limit_per_user;
|
|
38
|
-
this.topic = data.topic;
|
|
39
|
-
this.update(data);
|
|
40
|
-
}
|
|
41
|
-
update(data) {
|
|
42
|
-
super.update(data);
|
|
43
|
-
if (data.last_message_id !== undefined) {
|
|
44
|
-
this.lastMessage = data.last_message_id === null ? null : this.messages.get(data.last_message_id);
|
|
45
|
-
this.lastMessageID = data.last_message_id;
|
|
46
|
-
}
|
|
47
|
-
if (data.nsfw !== undefined) {
|
|
48
|
-
this.nsfw = data.nsfw;
|
|
49
|
-
}
|
|
50
|
-
if (data.position !== undefined) {
|
|
51
|
-
this.position = data.position;
|
|
52
|
-
}
|
|
53
|
-
if (data.rate_limit_per_user !== undefined) {
|
|
54
|
-
this.rateLimitPerUser = data.rate_limit_per_user;
|
|
55
|
-
}
|
|
56
|
-
if (data.topic !== undefined) {
|
|
57
|
-
this.topic = data.topic;
|
|
58
|
-
}
|
|
59
|
-
if (data.permission_overwrites !== undefined) {
|
|
60
|
-
for (const id of this.permissionOverwrites.keys()) {
|
|
61
|
-
if (!data.permission_overwrites.some(overwrite => overwrite.id === id)) {
|
|
62
|
-
this.permissionOverwrites.delete(id);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
data.permission_overwrites.map(overwrite => this.permissionOverwrites.update(overwrite));
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
get parent() {
|
|
69
|
-
return super.parent;
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Create an invite for this channel. If the guild is not a `COMMUNITY` server, invites can only be made to last 30 days.
|
|
73
|
-
* @param options The options for the invite.
|
|
74
|
-
*/
|
|
75
|
-
async createInvite(options) {
|
|
76
|
-
return this.client.rest.channels.createInvite(this.id, options);
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* Create a message in this channel.
|
|
80
|
-
* @param options The options for the message.
|
|
81
|
-
*/
|
|
82
|
-
async createMessage(options) {
|
|
83
|
-
return this.client.rest.channels.createMessage(this.id, options);
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Add a reaction to a message in this channel.
|
|
87
|
-
* @param messageID The ID of the message to add a reaction to.
|
|
88
|
-
* @param emoji The reaction to add to the message. `name:id` for custom emojis, and the unicode codepoint for default emojis.
|
|
89
|
-
*/
|
|
90
|
-
async createReaction(messageID, emoji) {
|
|
91
|
-
return this.client.rest.channels.createReaction(this.id, messageID, emoji);
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Create a webhook in this channel.
|
|
95
|
-
* @param options The options to create the webhook with.
|
|
96
|
-
*/
|
|
97
|
-
async createWebhook(options) {
|
|
98
|
-
return this.client.rest.webhooks.create(this.id, options);
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* Delete a message in this channel.
|
|
102
|
-
* @param messageID The ID of the message to delete.
|
|
103
|
-
* @param reason The reason for deleting the message.
|
|
104
|
-
*/
|
|
105
|
-
async deleteMessage(messageID, reason) {
|
|
106
|
-
return this.client.rest.channels.deleteMessage(this.id, messageID, reason);
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* Bulk delete messages in this channel.
|
|
110
|
-
* @param messageIDs The IDs of the messages to delete. Any duplicates or messages older than two weeks will cause an error.
|
|
111
|
-
* @param reason The reason for deleting the messages.
|
|
112
|
-
*/
|
|
113
|
-
async deleteMessages(messageIDs, reason) {
|
|
114
|
-
return this.client.rest.channels.deleteMessages(this.id, messageIDs, reason);
|
|
115
|
-
}
|
|
116
|
-
/**
|
|
117
|
-
* Delete a permission overwrite on this channel.
|
|
118
|
-
* @param overwriteID The ID of the permission overwrite to delete.
|
|
119
|
-
* @param reason The reason for deleting the permission overwrite.
|
|
120
|
-
*/
|
|
121
|
-
async deletePermission(overwriteID, reason) {
|
|
122
|
-
return this.client.rest.channels.deletePermission(this.id, overwriteID, reason);
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* Remove a reaction from a message in this channel.
|
|
126
|
-
* @param messageID The ID of the message to remove a reaction from.
|
|
127
|
-
* @param emoji The reaction to remove from the message. `name:id` for custom emojis, and the unicode codepoint for default emojis.
|
|
128
|
-
* @param user The user to remove the reaction from, `@me` for the current user (default).
|
|
129
|
-
*/
|
|
130
|
-
async deleteReaction(messageID, emoji, user = "@me") {
|
|
131
|
-
return this.client.rest.channels.deleteReaction(this.id, messageID, emoji, user);
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
|
-
* Remove all, or a specific emoji's reactions from a message in this channel.
|
|
135
|
-
* @param messageID The ID of the message to remove reactions from.
|
|
136
|
-
* @param emoji The reaction to remove from the message. `name:id` for custom emojis, and the unicode codepoint for default emojis. Omit to remove all reactions.
|
|
137
|
-
*/
|
|
138
|
-
async deleteReactions(messageID, emoji) {
|
|
139
|
-
return this.client.rest.channels.deleteReactions(this.id, messageID, emoji);
|
|
140
|
-
}
|
|
141
|
-
/**
|
|
142
|
-
* Edit a message in this channel.
|
|
143
|
-
* @param messageID The ID of the message to edit.
|
|
144
|
-
* @param options The options for editing the message.
|
|
145
|
-
*/
|
|
146
|
-
async editMessage(messageID, options) {
|
|
147
|
-
return this.client.rest.channels.editMessage(this.id, messageID, options);
|
|
148
|
-
}
|
|
149
|
-
/**
|
|
150
|
-
* Edit a permission overwrite on this channel.
|
|
151
|
-
* @param overwriteID The ID of the permission overwrite to edit.
|
|
152
|
-
* @param options The options for editing the permission overwrite.
|
|
153
|
-
*/
|
|
154
|
-
async editPermission(overwriteID, options) {
|
|
155
|
-
return this.client.rest.channels.editPermission(this.id, overwriteID, options);
|
|
156
|
-
}
|
|
157
|
-
/**
|
|
158
|
-
* Get the invites of this channel.
|
|
159
|
-
*/
|
|
160
|
-
async getInvites() {
|
|
161
|
-
return this.client.rest.channels.getInvites(this.id);
|
|
162
|
-
}
|
|
163
|
-
/**
|
|
164
|
-
* Get a message in this channel.
|
|
165
|
-
* @param messageID The ID of the message to get.
|
|
166
|
-
*/
|
|
167
|
-
async getMessage(messageID) {
|
|
168
|
-
return this.client.rest.channels.getMessage(this.id, messageID);
|
|
169
|
-
}
|
|
170
|
-
/**
|
|
171
|
-
* Get messages in this channel.
|
|
172
|
-
* @param options The options for getting the messages. `before`, `after`, and `around `All are mutually exclusive.
|
|
173
|
-
*/
|
|
174
|
-
async getMessages(options) {
|
|
175
|
-
return this.client.rest.channels.getMessages(this.id, options);
|
|
176
|
-
}
|
|
177
|
-
/**
|
|
178
|
-
* Get the pinned messages in this channel.
|
|
179
|
-
*/
|
|
180
|
-
async getPinnedMessages() {
|
|
181
|
-
return this.client.rest.channels.getPinnedMessages(this.id);
|
|
182
|
-
}
|
|
183
|
-
/**
|
|
184
|
-
* Get the users who reacted with a specific emoji on a message in this channel.
|
|
185
|
-
* @param messageID The ID of the message to get reactions from.
|
|
186
|
-
* @param emoji The reaction to remove from the message. `name:id` for custom emojis, and the unicode codepoint for default emojis.
|
|
187
|
-
* @param options The options for getting the reactions.
|
|
188
|
-
*/
|
|
189
|
-
async getReactions(messageID, emoji, options) {
|
|
190
|
-
return this.client.rest.channels.getReactions(this.id, messageID, emoji, options);
|
|
191
|
-
}
|
|
192
|
-
/**
|
|
193
|
-
* Get the webhooks in this channel.
|
|
194
|
-
*/
|
|
195
|
-
async getWebhooks() {
|
|
196
|
-
return this.client.rest.webhooks.getForChannel(this.id);
|
|
197
|
-
}
|
|
198
|
-
/**
|
|
199
|
-
* Get the permissions of a member. If providing an id, the member must be cached.
|
|
200
|
-
* @param member The member to get the permissions of.
|
|
201
|
-
*/
|
|
202
|
-
permissionsOf(member) {
|
|
203
|
-
if (typeof member === "string") {
|
|
204
|
-
member = this.guild.members.get(member);
|
|
205
|
-
}
|
|
206
|
-
if (!member) {
|
|
207
|
-
throw new Errors_1.UncachedError(`Cannot use ${this.constructor.name}#permissionsOf with an ID when the member is not cached.`);
|
|
208
|
-
}
|
|
209
|
-
let permission = this.guild.permissionsOf(member).allow;
|
|
210
|
-
if (permission & Constants_1.Permissions.ADMINISTRATOR) {
|
|
211
|
-
return new Permission_1.default(Constants_1.AllPermissions);
|
|
212
|
-
}
|
|
213
|
-
let overwrite = this.permissionOverwrites.get(this.guildID);
|
|
214
|
-
if (overwrite) {
|
|
215
|
-
permission = (permission & ~overwrite.deny) | overwrite.allow;
|
|
216
|
-
}
|
|
217
|
-
let deny = 0n;
|
|
218
|
-
let allow = 0n;
|
|
219
|
-
for (const id of member.roles) {
|
|
220
|
-
if ((overwrite = this.permissionOverwrites.get(id))) {
|
|
221
|
-
deny |= overwrite.deny;
|
|
222
|
-
allow |= overwrite.allow;
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
permission = (permission & ~deny) | allow;
|
|
226
|
-
overwrite = this.permissionOverwrites.get(member.id);
|
|
227
|
-
if (overwrite) {
|
|
228
|
-
permission = (permission & ~overwrite.deny) | overwrite.allow;
|
|
229
|
-
}
|
|
230
|
-
return new Permission_1.default(permission);
|
|
231
|
-
}
|
|
232
|
-
/**
|
|
233
|
-
* Pin a message in this channel.
|
|
234
|
-
* @param messageID The ID of the message to pin.
|
|
235
|
-
* @param reason The reason for pinning the message.
|
|
236
|
-
*/
|
|
237
|
-
async pinMessage(messageID, reason) {
|
|
238
|
-
return this.client.rest.channels.pinMessage(this.id, messageID, reason);
|
|
239
|
-
}
|
|
240
|
-
/**
|
|
241
|
-
* Purge an amount of messages from this channel.
|
|
242
|
-
* @param options The options to purge. `before`, `after`, and `around `All are mutually exclusive.
|
|
243
|
-
*/
|
|
244
|
-
async purge(options) {
|
|
245
|
-
return this.client.rest.channels.purgeMessages(this.id, options);
|
|
246
|
-
}
|
|
247
|
-
/**
|
|
248
|
-
* Show a typing indicator in this channel. How long users see this varies from client to client.
|
|
249
|
-
*/
|
|
250
|
-
async sendTyping() {
|
|
251
|
-
return this.client.rest.channels.sendTyping(this.id);
|
|
252
|
-
}
|
|
253
|
-
toJSON() {
|
|
254
|
-
return {
|
|
255
|
-
...super.toJSON(),
|
|
256
|
-
lastMessageID: this.lastMessageID,
|
|
257
|
-
messages: this.messages.map(message => message.id),
|
|
258
|
-
nsfw: this.nsfw,
|
|
259
|
-
permissionOverwrites: this.permissionOverwrites.map(overwrite => overwrite.toJSON()),
|
|
260
|
-
position: this.position,
|
|
261
|
-
rateLimitPerUser: this.rateLimitPerUser,
|
|
262
|
-
topic: this.topic,
|
|
263
|
-
type: this.type
|
|
264
|
-
};
|
|
265
|
-
}
|
|
266
|
-
/**
|
|
267
|
-
* Unpin a message in this channel.
|
|
268
|
-
* @param messageID The ID of the message to unpin.
|
|
269
|
-
* @param reason The reason for unpinning the message.
|
|
270
|
-
*/
|
|
271
|
-
async unpinMessage(messageID, reason) {
|
|
272
|
-
return this.client.rest.channels.unpinMessage(this.id, messageID, reason);
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
exports.default = TextableChannel;
|
|
276
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVGV4dGFibGVDaGFubmVsLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi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QUFDLElBQUk7U0FDbEMsQ0FBQztJQUNOLENBQUM7SUFFRDs7OztPQUlHO0lBQ0gsS0FBSyxDQUFDLFlBQVksQ0FBQyxTQUFpQixFQUFFLE1BQWU7UUFDakQsT0FBTyxJQUFJLENBQUMsTUFBTSxDQUFDLElBQUksQ0FBQyxRQUFRLENBQUMsWUFBWSxDQUFDLElBQUksQ0FBQyxFQUFFLEVBQUUsU0FBUyxFQUFFLE1BQU0sQ0FBQyxDQUFDO0lBQzlFLENBQUM7Q0FDSjtBQWpTRCxrQ0FpU0MifQ==
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/** @module TextableVoiceChannel */
|
|
2
|
-
import Member from "./Member";
|
|
3
|
-
import type CategoryChannel from "./CategoryChannel";
|
|
4
|
-
import TextableChannel from "./TextableChannel";
|
|
5
|
-
import type VoiceState from "./VoiceState";
|
|
6
|
-
import type { VideoQualityModes } from "../Constants";
|
|
7
|
-
import type Client from "../Client";
|
|
8
|
-
import TypedCollection from "../util/TypedCollection";
|
|
9
|
-
import type { AnyVoiceChannel, RawStageChannel, RawVoiceChannel, VoiceChannels } from "../types/channels";
|
|
10
|
-
import type { JSONTextableVoiceChannel } from "../types/json";
|
|
11
|
-
import type { RawMember } from "../types/guilds";
|
|
12
|
-
import type { JoinVoiceChannelOptions } from "../types/voice";
|
|
13
|
-
import type { VoiceConnection } from "@discordjs/voice";
|
|
14
|
-
/** Represents a textable voice channel. */
|
|
15
|
-
export default class TextableVoiceChannel<T extends AnyVoiceChannel = AnyVoiceChannel> extends TextableChannel<T> {
|
|
16
|
-
/** The bitrate of the stage channel. */
|
|
17
|
-
bitrate: number;
|
|
18
|
-
/** The id of the voice region of the channel, `null` is automatic. */
|
|
19
|
-
rtcRegion: string | null;
|
|
20
|
-
type: VoiceChannels;
|
|
21
|
-
/** The maximum number of members in this voice channel, `0` is unlimited. */
|
|
22
|
-
userLimit: number;
|
|
23
|
-
/** The [video quality mode](https://discord.com/developers/docs/resources/channel#channel-object-video-quality-modes) of this channel. */
|
|
24
|
-
videoQualityMode: VideoQualityModes;
|
|
25
|
-
voiceMembers: TypedCollection<RawMember, Member, [guildID: string]>;
|
|
26
|
-
constructor(data: RawVoiceChannel | RawStageChannel, client: Client);
|
|
27
|
-
protected update(data: Partial<RawVoiceChannel | RawStageChannel>): void;
|
|
28
|
-
get parent(): CategoryChannel | null | undefined;
|
|
29
|
-
/** The voice states related to this channel. */
|
|
30
|
-
get voiceStates(): Array<VoiceState<T>>;
|
|
31
|
-
/**
|
|
32
|
-
* Join this stage channel.
|
|
33
|
-
* @param options The options to join the channel with.
|
|
34
|
-
*/
|
|
35
|
-
join(options: Omit<JoinVoiceChannelOptions, "guildID" | "channelID" | "voiceAdapterCreator">): VoiceConnection;
|
|
36
|
-
/** Leave this stage channel. */
|
|
37
|
-
leave(): void;
|
|
38
|
-
toJSON(): JSONTextableVoiceChannel;
|
|
39
|
-
}
|