@koishijs/plugin-adapter-discord 2.1.2 → 3.1.0
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/lib/index.d.ts +3 -14
- package/lib/index.js +21 -1544
- package/lib/index.js.map +4 -4
- package/package.json +10 -22
- package/lib/bot.d.ts +0 -64
- package/lib/sender.d.ts +0 -36
- package/lib/types/application.d.ts +0 -84
- package/lib/types/audit-log.d.ts +0 -128
- package/lib/types/ban.d.ts +0 -67
- package/lib/types/channel.d.ts +0 -368
- package/lib/types/command.d.ts +0 -214
- package/lib/types/component.d.ts +0 -84
- package/lib/types/device.d.ts +0 -41
- package/lib/types/emoji.d.ts +0 -63
- package/lib/types/gateway.d.ts +0 -248
- package/lib/types/guild-member.d.ts +0 -216
- package/lib/types/guild-scheduled-event.d.ts +0 -167
- package/lib/types/guild-template.d.ts +0 -88
- package/lib/types/guild.d.ts +0 -419
- package/lib/types/index.d.ts +0 -31
- package/lib/types/integration.d.ts +0 -111
- package/lib/types/interaction.d.ts +0 -182
- package/lib/types/internal.d.ts +0 -8
- package/lib/types/invite.d.ts +0 -163
- package/lib/types/message.d.ts +0 -404
- package/lib/types/presence.d.ts +0 -151
- package/lib/types/reaction.d.ts +0 -114
- package/lib/types/role.d.ts +0 -221
- package/lib/types/scheduled-event.d.ts +0 -167
- package/lib/types/stage-instance.d.ts +0 -78
- package/lib/types/sticker.d.ts +0 -149
- package/lib/types/team.d.ts +0 -30
- package/lib/types/thread.d.ts +0 -201
- package/lib/types/user.d.ts +0 -122
- package/lib/types/voice.d.ts +0 -102
- package/lib/types/webhook.d.ts +0 -199
- package/lib/types.d.ts +0 -354
- package/lib/utils.d.ts +0 -15
- package/lib/ws.d.ts +0 -26
package/lib/types/role.d.ts
DELETED
|
@@ -1,221 +0,0 @@
|
|
|
1
|
-
import { integer, snowflake } from '.';
|
|
2
|
-
/** https://discord.com/developers/docs/topics/permissions#permissions-bitwise-permission-flags */
|
|
3
|
-
export declare enum Permission {
|
|
4
|
-
/** Allows creation of instant invites */
|
|
5
|
-
CREATE_INSTANT_INVITE = 1,
|
|
6
|
-
/** Allows kicking members */
|
|
7
|
-
KICK_MEMBERS = 2,
|
|
8
|
-
/** Allows banning members */
|
|
9
|
-
BAN_MEMBERS = 4,
|
|
10
|
-
/** Allows all permissions and bypasses channel permission overwrites */
|
|
11
|
-
ADMINISTRATOR = 8,
|
|
12
|
-
/** Allows management and editing of channels */
|
|
13
|
-
MANAGE_CHANNELS = 16,
|
|
14
|
-
/** Allows management and editing of the guild */
|
|
15
|
-
MANAGE_GUILD = 32,
|
|
16
|
-
/** Allows for the addition of reactions to messages */
|
|
17
|
-
ADD_REACTIONS = 64,
|
|
18
|
-
/** Allows for viewing of audit logs */
|
|
19
|
-
VIEW_AUDIT_LOG = 128,
|
|
20
|
-
/** Allows for using priority speaker in a voice channel */
|
|
21
|
-
PRIORITY_SPEAKER = 256,
|
|
22
|
-
/** Allows the user to go live */
|
|
23
|
-
STREAM = 512,
|
|
24
|
-
/** Allows guild members to view a channel, which includes reading messages in text channels */
|
|
25
|
-
VIEW_CHANNEL = 1024,
|
|
26
|
-
/** Allows for sending messages in a channel (does not allow sending messages in threads) */
|
|
27
|
-
SEND_MESSAGES = 2048,
|
|
28
|
-
/** Allows for sending of /tts messages */
|
|
29
|
-
SEND_TTS_MESSAGES = 4096,
|
|
30
|
-
/** Allows for deletion of other users messages */
|
|
31
|
-
MANAGE_MESSAGES = 8192,
|
|
32
|
-
/** Links sent by users with this permission will be auto-embedded */
|
|
33
|
-
EMBED_LINKS = 16384,
|
|
34
|
-
/** Allows for uploading images and files */
|
|
35
|
-
ATTACH_FILES = 32768,
|
|
36
|
-
/** Allows for reading of message history */
|
|
37
|
-
READ_MESSAGE_HISTORY = 65536,
|
|
38
|
-
/** Allows for using the @everyone tag to notify all users in a channel, and the @here tag to notify all online users in a channel */
|
|
39
|
-
MENTION_EVERYONE = 131072,
|
|
40
|
-
/** Allows the usage of custom emojis from other servers */
|
|
41
|
-
USE_EXTERNAL_EMOJIS = 262144,
|
|
42
|
-
/** Allows for viewing guild insights */
|
|
43
|
-
VIEW_GUILD_INSIGHTS = 524288,
|
|
44
|
-
/** Allows for joining of a voice channel */
|
|
45
|
-
CONNECT = 1048576,
|
|
46
|
-
/** Allows for speaking in a voice channel */
|
|
47
|
-
SPEAK = 2097152,
|
|
48
|
-
/** Allows for muting members in a voice channel */
|
|
49
|
-
MUTE_MEMBERS = 4194304,
|
|
50
|
-
/** Allows for deafening of members in a voice channel */
|
|
51
|
-
DEAFEN_MEMBERS = 8388608,
|
|
52
|
-
/** Allows for moving of members between voice channels */
|
|
53
|
-
MOVE_MEMBERS = 16777216,
|
|
54
|
-
/** Allows for using voice-activity-detection in a voice channel */
|
|
55
|
-
USE_VAD = 33554432,
|
|
56
|
-
/** Allows for modification of own nickname */
|
|
57
|
-
CHANGE_NICKNAME = 67108864,
|
|
58
|
-
/** Allows for modification of other users nicknames */
|
|
59
|
-
MANAGE_NICKNAMES = 134217728,
|
|
60
|
-
/** Allows management and editing of roles */
|
|
61
|
-
MANAGE_ROLES = 268435456,
|
|
62
|
-
/** Allows management and editing of webhooks */
|
|
63
|
-
MANAGE_WEBHOOKS = 536870912,
|
|
64
|
-
/** Allows management and editing of emojis and stickers */
|
|
65
|
-
MANAGE_EMOJIS_AND_STICKERS = 1073741824,
|
|
66
|
-
/** Allows members to use application commands, including slash commands and context menu commands. */
|
|
67
|
-
USE_APPLICATION_COMMANDS = -2147483648,
|
|
68
|
-
/** Allows for requesting to speak in stage channels. (This permission is under active development and may be changed or removed.) */
|
|
69
|
-
REQUEST_TO_SPEAK = 1,
|
|
70
|
-
/** Allows for deleting and archiving threads, and viewing all private threads */
|
|
71
|
-
MANAGE_THREADS = 4,
|
|
72
|
-
/** Allows for creating threads */
|
|
73
|
-
CREATE_PUBLIC_THREADS = 8,
|
|
74
|
-
/** Allows for creating private threads */
|
|
75
|
-
CREATE_PRIVATE_THREADS = 16,
|
|
76
|
-
/** Allows the usage of custom stickers from other servers */
|
|
77
|
-
USE_EXTERNAL_STICKERS = 32,
|
|
78
|
-
/** Allows for sending messages in threads */
|
|
79
|
-
SEND_MESSAGES_IN_THREADS = 64,
|
|
80
|
-
/** Allows for launching activities (applications with the EMBEDDED flag) in a voice channel */
|
|
81
|
-
START_EMBEDDED_ACTIVITIES = 128
|
|
82
|
-
}
|
|
83
|
-
/** https://discord.com/developers/docs/topics/permissions#role-object-role-structure */
|
|
84
|
-
export interface Role {
|
|
85
|
-
/** role id */
|
|
86
|
-
id: snowflake;
|
|
87
|
-
/** role name */
|
|
88
|
-
name: string;
|
|
89
|
-
/** integer representation of hexadecimal color code */
|
|
90
|
-
color: integer;
|
|
91
|
-
/** if this role is pinned in the user listing */
|
|
92
|
-
hoist: boolean;
|
|
93
|
-
/** role icon hash */
|
|
94
|
-
icon?: string;
|
|
95
|
-
/** role unicode emoji */
|
|
96
|
-
unicode_emoji?: string;
|
|
97
|
-
/** position of this role */
|
|
98
|
-
position: integer;
|
|
99
|
-
/** permission bit set */
|
|
100
|
-
permissions: string;
|
|
101
|
-
/** whether this role is managed by an integration */
|
|
102
|
-
managed: boolean;
|
|
103
|
-
/** whether this role is mentionable */
|
|
104
|
-
mentionable: boolean;
|
|
105
|
-
/** the tags this role has */
|
|
106
|
-
tags?: RoleTags;
|
|
107
|
-
}
|
|
108
|
-
export declare namespace Role {
|
|
109
|
-
namespace Params {
|
|
110
|
-
/** https://discord.com/developers/docs/resources/guild#create-guild-role-json-params */
|
|
111
|
-
interface Create {
|
|
112
|
-
/** name of the role */
|
|
113
|
-
name: string;
|
|
114
|
-
/** bitwise value of the enabled/disabled permissions */
|
|
115
|
-
permissions: string;
|
|
116
|
-
/** RGB color value */
|
|
117
|
-
color: integer;
|
|
118
|
-
/** whether the role should be displayed separately in the sidebar */
|
|
119
|
-
hoist: boolean;
|
|
120
|
-
/** the role's icon image (if the guild has the ROLE_ICONS feature) */
|
|
121
|
-
icon: string;
|
|
122
|
-
/** the role's unicode emoji as a standard emoji (if the guild has the ROLE_ICONS feature) */
|
|
123
|
-
unicode_emoji: string;
|
|
124
|
-
/** whether the role should be mentionable */
|
|
125
|
-
mentionable: boolean;
|
|
126
|
-
}
|
|
127
|
-
/** https://discord.com/developers/docs/resources/guild#modify-guild-role-positions-json-params */
|
|
128
|
-
interface ModifyPositions {
|
|
129
|
-
/** role */
|
|
130
|
-
id: snowflake;
|
|
131
|
-
/** sorting position of the role */
|
|
132
|
-
position?: integer;
|
|
133
|
-
}
|
|
134
|
-
/** https://discord.com/developers/docs/resources/guild#modify-guild-role-json-params */
|
|
135
|
-
interface Modify {
|
|
136
|
-
/** name of the role */
|
|
137
|
-
name: string;
|
|
138
|
-
/** bitwise value of the enabled/disabled permissions */
|
|
139
|
-
permissions: string;
|
|
140
|
-
/** RGB color value */
|
|
141
|
-
color: integer;
|
|
142
|
-
/** whether the role should be displayed separately in the sidebar */
|
|
143
|
-
hoist: boolean;
|
|
144
|
-
/** the role's icon image (if the guild has the ROLE_ICONS feature) */
|
|
145
|
-
icon: string;
|
|
146
|
-
/** the role's unicode emoji as a standard emoji (if the guild has the ROLE_ICONS feature) */
|
|
147
|
-
unicode_emoji: string;
|
|
148
|
-
/** whether the role should be mentionable */
|
|
149
|
-
mentionable: boolean;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
/** https://discord.com/developers/docs/topics/permissions#role-object-role-tags-structure */
|
|
154
|
-
export interface RoleTags {
|
|
155
|
-
/** the id of the bot this role belongs to */
|
|
156
|
-
bot_id?: snowflake;
|
|
157
|
-
/** the id of the integration this role belongs to */
|
|
158
|
-
integration_id?: snowflake;
|
|
159
|
-
/** whether this is the guild's premium subscriber role */
|
|
160
|
-
premium_subscriber?: null;
|
|
161
|
-
}
|
|
162
|
-
/** https://discord.com/developers/docs/topics/gateway#guild-role-create-guild-role-create-event-fields */
|
|
163
|
-
export interface GuildRoleCreateEvent {
|
|
164
|
-
/** the id of the guild */
|
|
165
|
-
guild_id: snowflake;
|
|
166
|
-
/** the role created */
|
|
167
|
-
role: Role;
|
|
168
|
-
}
|
|
169
|
-
/** https://discord.com/developers/docs/topics/gateway#guild-role-update-guild-role-update-event-fields */
|
|
170
|
-
export interface GuildRoleUpdateEvent {
|
|
171
|
-
/** the id of the guild */
|
|
172
|
-
guild_id: snowflake;
|
|
173
|
-
/** the role updated */
|
|
174
|
-
role: Role;
|
|
175
|
-
}
|
|
176
|
-
/** https://discord.com/developers/docs/topics/gateway#guild-role-delete-guild-role-delete-event-fields */
|
|
177
|
-
export interface GuildRoleDeleteEvent {
|
|
178
|
-
/** id of the guild */
|
|
179
|
-
guild_id: snowflake;
|
|
180
|
-
/** id of the role */
|
|
181
|
-
role_id: snowflake;
|
|
182
|
-
}
|
|
183
|
-
declare module './gateway' {
|
|
184
|
-
interface GatewayEvents {
|
|
185
|
-
/** guild role was created */
|
|
186
|
-
GUILD_ROLE_CREATE: GuildRoleCreateEvent;
|
|
187
|
-
/** guild role was updated */
|
|
188
|
-
GUILD_ROLE_UPDATE: GuildRoleUpdateEvent;
|
|
189
|
-
/** guild role was deleted */
|
|
190
|
-
GUILD_ROLE_DELETE: GuildRoleDeleteEvent;
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
declare module './internal' {
|
|
194
|
-
interface Internal {
|
|
195
|
-
/**
|
|
196
|
-
* Returns a list of role objects for the guild.
|
|
197
|
-
* @see https://discord.com/developers/docs/resources/guild#get-guild-roles
|
|
198
|
-
*/
|
|
199
|
-
getGuildRoles(guild_id: snowflake): Promise<Role[]>;
|
|
200
|
-
/**
|
|
201
|
-
* Create a new role for the guild. Requires the MANAGE_ROLES permission. Returns the new role object on success. Fires a Guild Role Create Gateway event. All JSON params are optional.
|
|
202
|
-
* @see https://discord.com/developers/docs/resources/guild#create-guild-role
|
|
203
|
-
*/
|
|
204
|
-
createGuildRole(guild_id: snowflake, param: Role.Params.Create): Promise<Role>;
|
|
205
|
-
/**
|
|
206
|
-
* Modify the positions of a set of role objects for the guild. Requires the MANAGE_ROLES permission. Returns a list of all of the guild's role objects on success. Fires multiple Guild Role Update Gateway events.
|
|
207
|
-
* @see https://discord.com/developers/docs/resources/guild#modify-guild-role-positions
|
|
208
|
-
*/
|
|
209
|
-
modifyGuildRolePositions(guild_id: snowflake, param: Role.Params.ModifyPositions): Promise<Role[]>;
|
|
210
|
-
/**
|
|
211
|
-
* Modify a guild role. Requires the MANAGE_ROLES permission. Returns the updated role on success. Fires a Guild Role Update Gateway event.
|
|
212
|
-
* @see https://discord.com/developers/docs/resources/guild#modify-guild-role
|
|
213
|
-
*/
|
|
214
|
-
modifyGuildRole(guild_id: snowflake, role_id: snowflake, param: Role.Params.Modify): Promise<Role>;
|
|
215
|
-
/**
|
|
216
|
-
* Delete a guild role. Requires the MANAGE_ROLES permission. Returns a 204 empty response on success. Fires a Guild Role Delete Gateway event.
|
|
217
|
-
* @see https://discord.com/developers/docs/resources/guild#delete-guild-role
|
|
218
|
-
*/
|
|
219
|
-
deleteGuildRole(guild_id: snowflake, role_id: snowflake): Promise<void>;
|
|
220
|
-
}
|
|
221
|
-
}
|
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
import { GuildMember, integer, snowflake, timestamp, User } from '.';
|
|
2
|
-
/** https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-structure */
|
|
3
|
-
export interface GuildScheduledEvent {
|
|
4
|
-
/** the id of the scheduled event */
|
|
5
|
-
id: snowflake;
|
|
6
|
-
/** the guild id which the scheduled event belongs to */
|
|
7
|
-
guild_id: snowflake;
|
|
8
|
-
/** the channel id in which the scheduled event will be hosted, or null if scheduled entity type is EXTERNAL */
|
|
9
|
-
channel_id?: snowflake;
|
|
10
|
-
/** the id of the user that created the scheduled event * */
|
|
11
|
-
creator_id?: snowflake;
|
|
12
|
-
/** the name of the scheduled event (1-100 characters) */
|
|
13
|
-
name: string;
|
|
14
|
-
/** the description of the scheduled event (1-1000 characters) */
|
|
15
|
-
description?: string;
|
|
16
|
-
/** the time the scheduled event will start */
|
|
17
|
-
scheduled_start_time: timestamp;
|
|
18
|
-
/** the time the scheduled event will end, required if entity_type is EXTERNAL */
|
|
19
|
-
scheduled_end_time?: timestamp;
|
|
20
|
-
/** the privacy level of the scheduled event */
|
|
21
|
-
privacy_level: GuildScheduledEvent.PrivacyLevel;
|
|
22
|
-
/** the status of the scheduled event */
|
|
23
|
-
status: GuildScheduledEvent.Status;
|
|
24
|
-
/** the type of the scheduled event */
|
|
25
|
-
entity_type: GuildScheduledEvent.EntityType;
|
|
26
|
-
/** the id of an entity associated with a guild scheduled event */
|
|
27
|
-
entity_id?: snowflake;
|
|
28
|
-
/** additional metadata for the guild scheduled event */
|
|
29
|
-
entity_metadata?: GuildScheduledEvent.EntityMetadata;
|
|
30
|
-
/** the user that created the scheduled event */
|
|
31
|
-
creator?: User;
|
|
32
|
-
/** the number of users subscribed to the scheduled event */
|
|
33
|
-
user_count?: integer;
|
|
34
|
-
}
|
|
35
|
-
export declare namespace GuildScheduledEvent {
|
|
36
|
-
/** https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-privacy-level */
|
|
37
|
-
enum PrivacyLevel {
|
|
38
|
-
/** the scheduled event is only accessible to guild members */
|
|
39
|
-
GUILD_ONLY = 2
|
|
40
|
-
}
|
|
41
|
-
/** https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-types */
|
|
42
|
-
enum EntityType {
|
|
43
|
-
STAGE_INSTANCE = 1,
|
|
44
|
-
VOICE = 2,
|
|
45
|
-
EXTERNAL = 3
|
|
46
|
-
}
|
|
47
|
-
/** https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-status */
|
|
48
|
-
enum Status {
|
|
49
|
-
SCHEDULED = 1,
|
|
50
|
-
ACTIVE = 2,
|
|
51
|
-
COMPLETED = 3,
|
|
52
|
-
CANCELLED = 4
|
|
53
|
-
}
|
|
54
|
-
/** https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-object-guild-scheduled-event-entity-metadata */
|
|
55
|
-
interface EntityMetadata {
|
|
56
|
-
/** location of the event (1-100 characters) */
|
|
57
|
-
location?: string;
|
|
58
|
-
}
|
|
59
|
-
/** https://discord.com/developers/docs/resources/guild-scheduled-event#list-scheduled-events-for-guild-query-string-params */
|
|
60
|
-
interface ListParams {
|
|
61
|
-
/** include number of users subscribed to each event */
|
|
62
|
-
with_user_count?: boolean;
|
|
63
|
-
}
|
|
64
|
-
/** https://discord.com/developers/docs/resources/guild-scheduled-event#create-guild-scheduled-event-json-params */
|
|
65
|
-
interface CreateParams {
|
|
66
|
-
/** the channel id of the scheduled event. */
|
|
67
|
-
channel_id?: snowflake;
|
|
68
|
-
/** the entity metadata of the scheduled event */
|
|
69
|
-
entity_metadata?: EntityMetadata;
|
|
70
|
-
/** the name of the scheduled event */
|
|
71
|
-
name: string;
|
|
72
|
-
/** the privacy level of the scheduled event */
|
|
73
|
-
privacy_level: PrivacyLevel;
|
|
74
|
-
/** the time to schedule the scheduled event */
|
|
75
|
-
scheduled_start_time: timestamp;
|
|
76
|
-
/** the time when the scheduled event is scheduled to end */
|
|
77
|
-
scheduled_end_time?: timestamp;
|
|
78
|
-
/** the description of the scheduled event */
|
|
79
|
-
description?: string;
|
|
80
|
-
/** the entity type of the scheduled event */
|
|
81
|
-
entity_type: EntityType;
|
|
82
|
-
}
|
|
83
|
-
/** https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event-query-string-params */
|
|
84
|
-
interface GetParams {
|
|
85
|
-
/** include number of users subscribed to this event */
|
|
86
|
-
with_user_count?: boolean;
|
|
87
|
-
}
|
|
88
|
-
/** https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event-json-params */
|
|
89
|
-
interface ModifyParams {
|
|
90
|
-
/** the channel id of the scheduled event, set to null if changing entity type to EXTERNAL */
|
|
91
|
-
channel_id?: snowflake;
|
|
92
|
-
/** the entity metadata of the scheduled event */
|
|
93
|
-
entity_metadata?: EntityMetadata;
|
|
94
|
-
/** the name of the scheduled event */
|
|
95
|
-
name?: string;
|
|
96
|
-
/** the privacy level of the scheduled event */
|
|
97
|
-
privacy_level?: PrivacyLevel;
|
|
98
|
-
/** the time to schedule the scheduled event */
|
|
99
|
-
scheduled_start_time?: timestamp;
|
|
100
|
-
/** the time when the scheduled event is scheduled to end */
|
|
101
|
-
scheduled_end_time?: timestamp;
|
|
102
|
-
/** the description of the scheduled event */
|
|
103
|
-
description?: string;
|
|
104
|
-
/** the entity type of the scheduled event */
|
|
105
|
-
entity_type?: EntityType;
|
|
106
|
-
/** the status of the scheduled event */
|
|
107
|
-
status?: Status;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
/** https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-user-object-guild-scheduled-event-user-structure */
|
|
111
|
-
export interface GuildScheduledEventUser {
|
|
112
|
-
/** the scheduled event id which the user subscribed to */
|
|
113
|
-
guild_scheduled_event_id: snowflake;
|
|
114
|
-
/** user which subscribed to an event */
|
|
115
|
-
user: User;
|
|
116
|
-
/** guild member data for this user for the guild which this event belongs to, if any */
|
|
117
|
-
member?: GuildMember;
|
|
118
|
-
}
|
|
119
|
-
export declare namespace GuildScheduledEventUser {
|
|
120
|
-
/** https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event-users-query-string-params */
|
|
121
|
-
interface GetParams {
|
|
122
|
-
/** number of users to return (up to maximum 100) */
|
|
123
|
-
limit?: number;
|
|
124
|
-
/** include guild member data if it exists */
|
|
125
|
-
with_member?: boolean;
|
|
126
|
-
/** consider only users before given user id */
|
|
127
|
-
before?: snowflake;
|
|
128
|
-
/** consider only users after given user id */
|
|
129
|
-
after?: snowflake;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
declare module './internal' {
|
|
133
|
-
interface Internal {
|
|
134
|
-
/**
|
|
135
|
-
* Returns a list of guild scheduled event objects for the given guild.
|
|
136
|
-
* @see https://discord.com/developers/docs/resources/guild-scheduled-event#list-scheduled-events-for-guild
|
|
137
|
-
*/
|
|
138
|
-
listScheduledEventsforGuild(guildId: snowflake, params?: GuildScheduledEvent.ListParams): Promise<GuildScheduledEvent[]>;
|
|
139
|
-
/**
|
|
140
|
-
* Create a guild scheduled event in the guild. Returns a guild scheduled event object on success.
|
|
141
|
-
* @see https://discord.com/developers/docs/resources/guild-scheduled-event#create-guild-scheduled-event
|
|
142
|
-
*/
|
|
143
|
-
createGuildScheduledEvent(guildId: snowflake, params: GuildScheduledEvent.CreateParams): Promise<GuildScheduledEvent>;
|
|
144
|
-
/**
|
|
145
|
-
* Get a guild scheduled event. Returns a guild scheduled event object on success.
|
|
146
|
-
* @see https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event
|
|
147
|
-
*/
|
|
148
|
-
getGuildScheduledEvent(guildId: snowflake, eventId: snowflake, params?: GuildScheduledEvent.GetParams): Promise<GuildScheduledEvent>;
|
|
149
|
-
/**
|
|
150
|
-
* Modify a guild scheduled event. Returns the modified guild scheduled event object on success.
|
|
151
|
-
* @see https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event
|
|
152
|
-
*/
|
|
153
|
-
modifyGuildScheduledEvent(guildId: snowflake, eventId: snowflake, params: GuildScheduledEvent.ModifyParams): Promise<GuildScheduledEvent>;
|
|
154
|
-
/**
|
|
155
|
-
* Delete a guild scheduled event. Returns a 204 on success.
|
|
156
|
-
* @see https://discord.com/developers/docs/resources/guild-scheduled-event#delete-guild-scheduled-event
|
|
157
|
-
*/
|
|
158
|
-
deleteGuildScheduledEvent(guildId: snowflake, eventId: snowflake): Promise<void>;
|
|
159
|
-
/**
|
|
160
|
-
* Get a list of guild scheduled event users subscribed to a guild scheduled event.
|
|
161
|
-
* Returns a list of guild scheduled event user objects on success.
|
|
162
|
-
* Guild member data, if it exists, is included if the with_member query parameter is set.
|
|
163
|
-
* @see https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event-users
|
|
164
|
-
*/
|
|
165
|
-
getGuildScheduledEventUsers(guildId: snowflake, eventId: snowflake, params?: GuildScheduledEventUser.GetParams): Promise<GuildScheduledEventUser[]>;
|
|
166
|
-
}
|
|
167
|
-
}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { integer, snowflake } from '.';
|
|
2
|
-
/** https://discord.com/developers/docs/resources/stage-instance#stage-instance-object-stage-instance-structure */
|
|
3
|
-
export interface StageInstance {
|
|
4
|
-
/** The id of this Stage instance */
|
|
5
|
-
id: snowflake;
|
|
6
|
-
/** The guild id of the associated Stage channel */
|
|
7
|
-
guild_id: snowflake;
|
|
8
|
-
/** The id of the associated Stage channel */
|
|
9
|
-
channel_id: snowflake;
|
|
10
|
-
/** The topic of the Stage instance (1-120 characters) */
|
|
11
|
-
topic: string;
|
|
12
|
-
/** The privacy level of the Stage instance */
|
|
13
|
-
privacy_level: integer;
|
|
14
|
-
/** Whether or not Stage Discovery is disabled */
|
|
15
|
-
discoverable_disabled: boolean;
|
|
16
|
-
}
|
|
17
|
-
export declare namespace StageInstance {
|
|
18
|
-
namespace Event {
|
|
19
|
-
interface Create extends StageInstance {
|
|
20
|
-
}
|
|
21
|
-
interface Delete extends StageInstance {
|
|
22
|
-
}
|
|
23
|
-
interface Update extends StageInstance {
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
namespace Params {
|
|
27
|
-
/** https://discord.com/developers/docs/resources/stage-instance#create-stage-instance-json-params */
|
|
28
|
-
interface Create {
|
|
29
|
-
/** The id of the Stage channel */
|
|
30
|
-
channel_id: snowflake;
|
|
31
|
-
/** The topic of the Stage instance (1-120 characters) */
|
|
32
|
-
topic: string;
|
|
33
|
-
/** The privacy level of the Stage instance (default GUILD_ONLY) */
|
|
34
|
-
privacy_level?: integer;
|
|
35
|
-
}
|
|
36
|
-
/** https://discord.com/developers/docs/resources/stage-instance#modify-stage-instance-json-params */
|
|
37
|
-
interface Modify {
|
|
38
|
-
/** The topic of the Stage instance (1-120 characters) */
|
|
39
|
-
topic?: string;
|
|
40
|
-
/** The privacy level of the Stage instance */
|
|
41
|
-
privacy_level?: integer;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
declare module './gateway' {
|
|
46
|
-
interface GatewayEvents {
|
|
47
|
-
/** stage instance was created */
|
|
48
|
-
STAGE_INSTANCE_CREATE: StageInstance.Event.Create;
|
|
49
|
-
/** stage instance was deleted or closed */
|
|
50
|
-
STAGE_INSTANCE_DELETE: StageInstance.Event.Delete;
|
|
51
|
-
/** stage instance was updated */
|
|
52
|
-
STAGE_INSTANCE_UPDATE: StageInstance.Event.Update;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
declare module './internal' {
|
|
56
|
-
interface Internal {
|
|
57
|
-
/**
|
|
58
|
-
* Creates a new Stage instance associated to a Stage channel.
|
|
59
|
-
* @see https://discord.com/developers/docs/resources/stage-instance#create-stage-instance
|
|
60
|
-
*/
|
|
61
|
-
createStageInstance(params: StageInstance.Params.Create): Promise<StageInstance>;
|
|
62
|
-
/**
|
|
63
|
-
* Gets the stage instance associated with the Stage channel, if it exists.
|
|
64
|
-
* @see https://discord.com/developers/docs/resources/stage-instance#get-stage-instance
|
|
65
|
-
*/
|
|
66
|
-
getStageInstance(channel_id: snowflake): Promise<StageInstance>;
|
|
67
|
-
/**
|
|
68
|
-
* Updates fields of an existing Stage instance.
|
|
69
|
-
* @see https://discord.com/developers/docs/resources/stage-instance#modify-stage-instance
|
|
70
|
-
*/
|
|
71
|
-
modifyStageInstance(channel_id: snowflake, params: StageInstance.Params.Modify): Promise<StageInstance>;
|
|
72
|
-
/**
|
|
73
|
-
* Deletes the Stage instance.
|
|
74
|
-
* @see https://discord.com/developers/docs/resources/stage-instance#delete-stage-instance
|
|
75
|
-
*/
|
|
76
|
-
deleteStageInstance(channel_id: snowflake): Promise<void>;
|
|
77
|
-
}
|
|
78
|
-
}
|
package/lib/types/sticker.d.ts
DELETED
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
import { integer, snowflake, User } from '.';
|
|
2
|
-
/** https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-structure */
|
|
3
|
-
export interface Sticker {
|
|
4
|
-
/** id of the sticker */
|
|
5
|
-
id: snowflake;
|
|
6
|
-
/** for standard stickers, id of the pack the sticker is from */
|
|
7
|
-
pack_id?: snowflake;
|
|
8
|
-
/** name of the sticker */
|
|
9
|
-
name: string;
|
|
10
|
-
/** description of the sticker */
|
|
11
|
-
description?: string;
|
|
12
|
-
/** autocomplete/suggestion tags for the sticker (max 200 characters) */
|
|
13
|
-
tags: string;
|
|
14
|
-
/** Deprecated previously the sticker asset hash, now an empty string */
|
|
15
|
-
asset: string;
|
|
16
|
-
/** type of sticker */
|
|
17
|
-
type: Sticker.Type;
|
|
18
|
-
/** type of sticker format */
|
|
19
|
-
format_type: Sticker.FormatType;
|
|
20
|
-
/** whether this guild sticker can be used, may be false due to loss of Server Boosts */
|
|
21
|
-
available?: boolean;
|
|
22
|
-
/** id of the guild that owns this sticker */
|
|
23
|
-
guild_id?: snowflake;
|
|
24
|
-
/** the user that uploaded the guild sticker */
|
|
25
|
-
user?: User;
|
|
26
|
-
/** the standard sticker's sort order within its pack */
|
|
27
|
-
sort_value?: integer;
|
|
28
|
-
}
|
|
29
|
-
export declare namespace Sticker {
|
|
30
|
-
/** https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-types */
|
|
31
|
-
enum Type {
|
|
32
|
-
/** an official sticker in a pack, part of Nitro or in a removed purchasable pack */
|
|
33
|
-
STANDARD = 1,
|
|
34
|
-
/** a sticker uploaded to a Boosted guild for the guild's members */
|
|
35
|
-
GUILD = 2
|
|
36
|
-
}
|
|
37
|
-
/** https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-format-types */
|
|
38
|
-
enum FormatType {
|
|
39
|
-
PNG = 1,
|
|
40
|
-
APNG = 2,
|
|
41
|
-
LOTTIE = 3
|
|
42
|
-
}
|
|
43
|
-
/** https://discord.com/developers/docs/resources/sticker#sticker-item-object-sticker-item-structure */
|
|
44
|
-
interface Item {
|
|
45
|
-
/** id of the sticker */
|
|
46
|
-
id: snowflake;
|
|
47
|
-
/** name of the sticker */
|
|
48
|
-
name: string;
|
|
49
|
-
/** type of sticker format */
|
|
50
|
-
format_type: FormatType;
|
|
51
|
-
}
|
|
52
|
-
/** https://discord.com/developers/docs/resources/sticker#sticker-pack-object-sticker-pack-structure */
|
|
53
|
-
interface Pack {
|
|
54
|
-
/** id of the sticker pack */
|
|
55
|
-
id: snowflake;
|
|
56
|
-
/** the stickers in the pack */
|
|
57
|
-
stickers: Sticker[];
|
|
58
|
-
/** name of the sticker pack */
|
|
59
|
-
name: string;
|
|
60
|
-
/** id of the pack's SKU */
|
|
61
|
-
sku_id: snowflake;
|
|
62
|
-
/** id of a sticker in the pack which is shown as the pack's icon */
|
|
63
|
-
cover_sticker_id?: snowflake;
|
|
64
|
-
/** description of the sticker pack */
|
|
65
|
-
description: string;
|
|
66
|
-
/** id of the sticker pack's banner image */
|
|
67
|
-
banner_asset_id: snowflake;
|
|
68
|
-
}
|
|
69
|
-
namespace Event {
|
|
70
|
-
/** https://discord.com/developers/docs/topics/gateway#guild-stickers-update-guild-stickers-update-event-fields */
|
|
71
|
-
interface Update {
|
|
72
|
-
/** id of the guild */
|
|
73
|
-
guild_id: snowflake;
|
|
74
|
-
/** array of stickers */
|
|
75
|
-
stickers: Sticker[];
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
/** https://discord.com/developers/docs/resources/sticker#list-nitro-sticker-packs-response-structure */
|
|
79
|
-
interface PackResult {
|
|
80
|
-
sticker_packs: Pack[];
|
|
81
|
-
}
|
|
82
|
-
namespace Params {
|
|
83
|
-
/** https://discord.com/developers/docs/resources/sticker#create-guild-sticker-form-params */
|
|
84
|
-
interface Create {
|
|
85
|
-
/** name of the sticker (2-30 characters) */
|
|
86
|
-
name: string;
|
|
87
|
-
/** description of the sticker (empty or 2-100 characters) */
|
|
88
|
-
description: string;
|
|
89
|
-
/** autocomplete/suggestion tags for the sticker (max 200 characters) */
|
|
90
|
-
tags: string;
|
|
91
|
-
/** the sticker file to upload, must be a PNG, APNG, or Lottie JSON file, max 500 KB */
|
|
92
|
-
file: any;
|
|
93
|
-
}
|
|
94
|
-
/** https://discord.com/developers/docs/resources/sticker#modify-guild-sticker-json-params */
|
|
95
|
-
interface Modify {
|
|
96
|
-
/** name of the sticker (2-30 characters) */
|
|
97
|
-
name: string;
|
|
98
|
-
/** description of the sticker (2-100 characters) */
|
|
99
|
-
description?: string;
|
|
100
|
-
/** autocomplete/suggestion tags for the sticker (max 200 characters) */
|
|
101
|
-
tags: string;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
declare module './gateway' {
|
|
106
|
-
interface GatewayEvents {
|
|
107
|
-
/** guild stickers were updated */
|
|
108
|
-
GUILD_STICKERS_UPDATE: Sticker.Event.Update;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
declare module './internal' {
|
|
112
|
-
interface Internal {
|
|
113
|
-
/**
|
|
114
|
-
* Returns a sticker object for the given sticker ID.
|
|
115
|
-
* @see https://discord.com/developers/docs/resources/sticker#get-sticker
|
|
116
|
-
*/
|
|
117
|
-
getSticker(sticker_id: snowflake): Promise<Sticker>;
|
|
118
|
-
/**
|
|
119
|
-
* Returns the list of sticker packs available to Nitro subscribers.
|
|
120
|
-
* @see https://discord.com/developers/docs/resources/sticker#list-nitro-sticker-packs
|
|
121
|
-
*/
|
|
122
|
-
listNitroStickerPacks(): Promise<Sticker.PackResult>;
|
|
123
|
-
/**
|
|
124
|
-
* Returns an array of sticker objects for the given guild. Includes user fields if the bot has the MANAGE_EMOJIS_AND_STICKERS permission.
|
|
125
|
-
* @see https://discord.com/developers/docs/resources/sticker#list-guild-stickers
|
|
126
|
-
*/
|
|
127
|
-
listGuildStickers(guild_id: snowflake): Promise<Sticker[]>;
|
|
128
|
-
/**
|
|
129
|
-
* Returns a sticker object for the given guild and sticker IDs. Includes the user field if the bot has the MANAGE_EMOJIS_AND_STICKERS permission.
|
|
130
|
-
* @see https://discord.com/developers/docs/resources/sticker#get-guild-sticker
|
|
131
|
-
*/
|
|
132
|
-
getGuildSticker(guild_id: snowflake, sticker_id: snowflake): Promise<Sticker>;
|
|
133
|
-
/**
|
|
134
|
-
* Create a new sticker for the guild. Send a multipart/form-data body. Requires the MANAGE_EMOJIS_AND_STICKERS permission. Returns the new sticker object on success.
|
|
135
|
-
* @see https://discord.com/developers/docs/resources/sticker#create-guild-sticker
|
|
136
|
-
*/
|
|
137
|
-
createGuildSticker(guild_id: snowflake, params: Sticker.Params.Create): Promise<Sticker>;
|
|
138
|
-
/**
|
|
139
|
-
* Modify the given sticker. Requires the MANAGE_EMOJIS_AND_STICKERS permission. Returns the updated sticker object on success.
|
|
140
|
-
* @see https://discord.com/developers/docs/resources/sticker#modify-guild-sticker
|
|
141
|
-
*/
|
|
142
|
-
modifyGuildSticker(guild_id: snowflake, sticker_id: snowflake, params: Sticker.Params.Modify): Promise<Sticker>;
|
|
143
|
-
/**
|
|
144
|
-
* Delete the given sticker. Requires the MANAGE_EMOJIS_AND_STICKERS permission. Returns 204 No Content on success.
|
|
145
|
-
* @see https://discord.com/developers/docs/resources/sticker#delete-guild-sticker
|
|
146
|
-
*/
|
|
147
|
-
deleteGuildSticker(guild_id: snowflake, sticker_id: snowflake): Promise<void>;
|
|
148
|
-
}
|
|
149
|
-
}
|
package/lib/types/team.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { snowflake, User } from '.';
|
|
2
|
-
/** https://discord.com/developers/docs/topics/teams#data-models-team-object */
|
|
3
|
-
export interface Team {
|
|
4
|
-
/** a hash of the image of the team's icon */
|
|
5
|
-
icon?: string;
|
|
6
|
-
/** the unique id of the team */
|
|
7
|
-
id: snowflake;
|
|
8
|
-
/** the members of the team */
|
|
9
|
-
members: TeamMember[];
|
|
10
|
-
/** the name of the team */
|
|
11
|
-
name: string;
|
|
12
|
-
/** the user id of the current team owner */
|
|
13
|
-
owner_user_id: snowflake;
|
|
14
|
-
}
|
|
15
|
-
/** https://discord.com/developers/docs/topics/teams#data-models-team-member-object */
|
|
16
|
-
export interface TeamMember {
|
|
17
|
-
/** the user's membership state on the team */
|
|
18
|
-
membership_state: MembershipState;
|
|
19
|
-
/** will always be ["*"] */
|
|
20
|
-
permissions: string[];
|
|
21
|
-
/** the id of the parent team of which they are a member */
|
|
22
|
-
team_id: snowflake;
|
|
23
|
-
/** the avatar, discriminator, id, and username of the user */
|
|
24
|
-
user: Partial<User>;
|
|
25
|
-
}
|
|
26
|
-
/** https://discord.com/developers/docs/topics/teams#data-models-membership-state-enum */
|
|
27
|
-
export declare enum MembershipState {
|
|
28
|
-
INVITED = 1,
|
|
29
|
-
ACCEPTED = 2
|
|
30
|
-
}
|