@koishijs/plugin-adapter-discord 2.0.0-alpha.7 → 2.0.0-beta.3

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.
@@ -0,0 +1,41 @@
1
+ /** https://discord.com/developers/docs/topics/certified-devices#models-device-object */
2
+ export interface Device {
3
+ /** the type of device */
4
+ type: DeviceType;
5
+ /** the device's Windows UUID */
6
+ id: string;
7
+ /** the hardware vendor */
8
+ vendor: Vendor;
9
+ /** the model of the product */
10
+ model: Model;
11
+ /** UUIDs of related devices */
12
+ related: string[];
13
+ /** if the device's native echo cancellation is enabled */
14
+ echo_cancellation?: boolean;
15
+ /** if the device's native noise suppression is enabled */
16
+ noise_suppression?: boolean;
17
+ /** if the device's native automatic gain control is enabled */
18
+ automatic_gain_control?: boolean;
19
+ /** if the device is hardware muted */
20
+ hardware_mute?: boolean;
21
+ }
22
+ /** https://discord.com/developers/docs/topics/certified-devices#models-vendor-object */
23
+ export interface Vendor {
24
+ /** name of the vendor */
25
+ name: string;
26
+ /** url for the vendor */
27
+ url: string;
28
+ }
29
+ /** https://discord.com/developers/docs/topics/certified-devices#models-model-object */
30
+ export interface Model {
31
+ /** name of the model */
32
+ name: string;
33
+ /** url for the model */
34
+ url: string;
35
+ }
36
+ /** https://discord.com/developers/docs/topics/certified-devices#models-device-type */
37
+ export declare enum DeviceType {
38
+ AUDIO_INPUT = "audioinput",
39
+ AUDIO_OUTPUT = "audiooutput",
40
+ VIDEO_INPUT = "videoinput"
41
+ }
@@ -0,0 +1,144 @@
1
+ import { GuildMember, integer, snowflake, User } from '.';
2
+ /** https://discord.com/developers/docs/resources/emoji#emoji-object-emoji-structure */
3
+ export interface Emoji {
4
+ /** emoji id */
5
+ id?: snowflake;
6
+ /** emoji name */
7
+ name?: string;
8
+ /** roles allowed to use this emoji */
9
+ roles?: snowflake[];
10
+ /** user that created this emoji */
11
+ user?: User;
12
+ /** whether this emoji must be wrapped in colons */
13
+ require_colons?: boolean;
14
+ /** whether this emoji is managed */
15
+ managed?: boolean;
16
+ /** whether this emoji is animated */
17
+ animated?: boolean;
18
+ /** whether this emoji can be used, may be false due to loss of Server Boosts */
19
+ available?: boolean;
20
+ }
21
+ /** https://discord.com/developers/docs/resources/channel#reaction-object-reaction-structure */
22
+ export interface Reaction {
23
+ /** times this emoji has been used to react */
24
+ count: integer;
25
+ /** whether the current user reacted using this emoji */
26
+ me: boolean;
27
+ /** emoji information */
28
+ emoji: Partial<Emoji>;
29
+ }
30
+ /** https://discord.com/developers/docs/topics/gateway#guild-emojis-update-guild-emojis-update-event-fields */
31
+ export interface GuildEmojisUpdateEvent {
32
+ /** id of the guild */
33
+ guild_id: snowflake;
34
+ /** array of emojis */
35
+ emojis: Emoji[];
36
+ }
37
+ /** https://discord.com/developers/docs/topics/gateway#message-reaction-add-message-reaction-add-event-fields */
38
+ export interface MessageReactionAddEvent {
39
+ /** the id of the user */
40
+ user_id: snowflake;
41
+ /** the id of the channel */
42
+ channel_id: snowflake;
43
+ /** the id of the message */
44
+ message_id: snowflake;
45
+ /** the id of the guild */
46
+ guild_id?: snowflake;
47
+ /** the member who reacted if this happened in a guild */
48
+ member?: GuildMember;
49
+ /** the emoji used to react - example */
50
+ emoji: Partial<Emoji>;
51
+ }
52
+ /** https://discord.com/developers/docs/topics/gateway#message-reaction-remove-message-reaction-remove-event-fields */
53
+ export interface MessageReactionRemoveEvent {
54
+ /** the id of the user */
55
+ user_id: snowflake;
56
+ /** the id of the channel */
57
+ channel_id: snowflake;
58
+ /** the id of the message */
59
+ message_id: snowflake;
60
+ /** the id of the guild */
61
+ guild_id?: snowflake;
62
+ /** the emoji used to react - example */
63
+ emoji: Partial<Emoji>;
64
+ }
65
+ /** https://discord.com/developers/docs/topics/gateway#message-reaction-remove-all-message-reaction-remove-all-event-fields */
66
+ export interface MessageReactionRemoveAllEvent {
67
+ /** the id of the channel */
68
+ channel_id: snowflake;
69
+ /** the id of the message */
70
+ message_id: snowflake;
71
+ /** the id of the guild */
72
+ guild_id?: snowflake;
73
+ }
74
+ /** https://discord.com/developers/docs/topics/gateway#message-reaction-remove-emoji-message-reaction-remove-emoji */
75
+ export interface MessageReactionRemoveEmojiEvent {
76
+ /** the id of the channel */
77
+ channel_id: snowflake;
78
+ /** the id of the guild */
79
+ guild_id?: snowflake;
80
+ /** the id of the message */
81
+ message_id: snowflake;
82
+ /** the emoji that was removed */
83
+ emoji: Partial<Emoji>;
84
+ }
85
+ declare module './gateway' {
86
+ interface GatewayEvents {
87
+ /** guild emojis were updated */
88
+ GUILD_EMOJIS_UPDATE: GuildEmojisUpdateEvent;
89
+ /** user reacted to a message */
90
+ MESSAGE_REACTION_ADD: MessageReactionAddEvent;
91
+ /** user removed a reaction from a message */
92
+ MESSAGE_REACTION_REMOVE: MessageReactionRemoveEvent;
93
+ /** all reactions were explicitly removed from a message */
94
+ MESSAGE_REACTION_REMOVE_ALL: MessageReactionRemoveAllEvent;
95
+ /** all reactions for a given emoji were explicitly removed from a message */
96
+ MESSAGE_REACTION_REMOVE_EMOJI: MessageReactionRemoveEmojiEvent;
97
+ }
98
+ }
99
+ export interface ModifyGuildEmojiOptions {
100
+ /** name of the emoji */
101
+ name?: string;
102
+ /** array of snowflakes roles allowed to use this emoji */
103
+ roles?: snowflake[];
104
+ }
105
+ export interface CreateGuildEmojiOptions extends ModifyGuildEmojiOptions {
106
+ /** the 128x128 emoji image */
107
+ image: string;
108
+ }
109
+ declare module './internal' {
110
+ interface Internal {
111
+ /** https://discord.com/developers/docs/resources/emoji#list-guild-emojis */
112
+ listGuildEmojis(guild_id: snowflake): Promise<Emoji[]>;
113
+ /** https://discord.com/developers/docs/resources/emoji#get-guild-emoji */
114
+ getGuildEmoji(guild_id: snowflake, emoji_id: snowflake): Promise<Emoji>;
115
+ /** https://discord.com/developers/docs/resources/emoji#create-guild-emoji */
116
+ createGuildEmoji(guild_id: snowflake, options: CreateGuildEmojiOptions): Promise<Emoji>;
117
+ /** https://discord.com/developers/docs/resources/emoji#modify-guild-emoji */
118
+ modifyGuildEmoji(guild_id: snowflake, emoji_id: snowflake, options: ModifyGuildEmojiOptions): Promise<Emoji>;
119
+ /** https://discord.com/developers/docs/resources/emoji#delete-guild-emoji */
120
+ deleteGuildEmoji(guild_id: snowflake, emoji_id: snowflake): Promise<void>;
121
+ }
122
+ }
123
+ export interface GetReactionsOptions {
124
+ /** get users after this user ID */
125
+ after?: snowflake;
126
+ /** max number of users to return (1-100) */
127
+ limit?: integer;
128
+ }
129
+ declare module './internal' {
130
+ interface Internal {
131
+ /** https://discord.com/developers/docs/resources/channel#create-reaction */
132
+ createReaction(channel_id: snowflake, message_id: snowflake, emoji: string): Promise<void>;
133
+ /** https://discord.com/developers/docs/resources/channel#delete-own-reaction */
134
+ deleteOwnReaction(channel_id: snowflake, message_id: snowflake, emoji: string): Promise<void>;
135
+ /** https://discord.com/developers/docs/resources/channel#delete-user-reaction */
136
+ deleteUserReaction(channel_id: snowflake, message_id: snowflake, emoji: string, user_id: snowflake): Promise<void>;
137
+ /** https://discord.com/developers/docs/resources/channel#get-reactions */
138
+ getReactions(channel_id: snowflake, message_id: snowflake, emoji: string, options?: GetReactionsOptions): Promise<Reaction[]>;
139
+ /** https://discord.com/developers/docs/resources/channel#delete-all-reactions */
140
+ deleteAllReactions(channel_id: snowflake, message_id: snowflake): Promise<void>;
141
+ /** https://discord.com/developers/docs/resources/channel#delete-all-reactions-for-emoji */
142
+ deleteAllReactionsForEmoji(channel_id: snowflake, message_id: snowflake, emoji: string): Promise<void>;
143
+ }
144
+ }
@@ -0,0 +1,242 @@
1
+ import { Activity, integer, snowflake, StatusType } from '.';
2
+ /** https://discord.com/developers/docs/topics/gateway#payloads-gateway-payload-structure */
3
+ export interface GatewayPayloadStructure<O extends GatewayOpcode, T extends keyof GatewayEvents, D> {
4
+ /** opcode for the payload */
5
+ op: O;
6
+ /** event data */
7
+ d?: D;
8
+ /** the event name for this payload */
9
+ t?: T;
10
+ /** sequence number, used for resuming sessions and heartbeats */
11
+ s?: number;
12
+ }
13
+ export declare type GatewayPayload = {
14
+ [O in GatewayOpcode]: O extends GatewayOpcode.DISPATCH ? {
15
+ [T in keyof GatewayEvents]: GatewayPayloadStructure<GatewayOpcode.DISPATCH, T, GatewayEvents[T]>;
16
+ }[keyof GatewayEvents] : GatewayPayloadStructure<O, never, O extends keyof GatewayParams ? GatewayParams[O] : never>;
17
+ }[GatewayOpcode];
18
+ /** https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-opcodes */
19
+ export declare enum GatewayOpcode {
20
+ /** An event was dispatched. */
21
+ DISPATCH = 0,
22
+ /** Fired periodically by the client to keep the connection alive. */
23
+ HEARTBEAT = 1,
24
+ /** Starts a new session during the initial handshake. */
25
+ IDENTIFY = 2,
26
+ /** Update the client's presence. */
27
+ PRESENCE_UPDATE = 3,
28
+ /** Used to join/leave or move between voice channels. */
29
+ VOICE_STATE_UPDATE = 4,
30
+ /** Resume a previous session that was disconnected. */
31
+ RESUME = 6,
32
+ /** You should attempt to reconnect and resume immediately. */
33
+ RECONNECT = 7,
34
+ /** Request information about offline guild members in a large guild. */
35
+ REQUEST_GUILD_MEMBERS = 8,
36
+ /** The session has been invalidated. You should reconnect and identify/resume accordingly. */
37
+ INVALID_SESSION = 9,
38
+ /** Sent immediately after connecting, contains the `heartbeat_interval` to use. */
39
+ HELLO = 10,
40
+ /** Sent in response to receiving a heartbeat to acknowledge that it has been received. */
41
+ HEARTBEAT_ACK = 11
42
+ }
43
+ /** https://discord.com/developers/docs/topics/gateway#gateway-intents */
44
+ export declare enum GatewayIntent {
45
+ /**
46
+ * - GUILD_CREATE
47
+ * - GUILD_UPDATE
48
+ * - GUILD_DELETE
49
+ * - GUILD_ROLE_CREATE
50
+ * - GUILD_ROLE_UPDATE
51
+ * - GUILD_ROLE_DELETE
52
+ * - CHANNEL_CREATE
53
+ * - CHANNEL_UPDATE
54
+ * - CHANNEL_DELETE
55
+ * - CHANNEL_PINS_UPDATE
56
+ * - THREAD_CREATE
57
+ * - THREAD_UPDATE
58
+ * - THREAD_DELETE
59
+ * - THREAD_LIST_SYNC
60
+ * - THREAD_MEMBER_UPDATE
61
+ * - THREAD_MEMBERS_UPDATE
62
+ * - STAGE_INSTANCE_CREATE
63
+ * - STAGE_INSTANCE_UPDATE
64
+ * - STAGE_INSTANCE_DELETE
65
+ */
66
+ GUILD_CREATE = 1,
67
+ /**
68
+ * - GUILD_MEMBER_ADD
69
+ * - GUILD_MEMBER_UPDATE
70
+ * - GUILD_MEMBER_REMOVE
71
+ * - THREAD_MEMBERS_UPDATE
72
+ */
73
+ GUILD_MEMBERS = 2,
74
+ /**
75
+ * - GUILD_BAN_ADD
76
+ * - GUILD_BAN_REMOVE
77
+ */
78
+ GUILD_BANS = 4,
79
+ /**
80
+ * - GUILD_EMOJIS_UPDATE
81
+ * - GUILD_STICKERS_UPDATE
82
+ */
83
+ GUILD_EMOJIS_AND_STICKERS = 8,
84
+ /**
85
+ * - GUILD_INTEGRATIONS_UPDATE
86
+ * - INTEGRATION_CREATE
87
+ * - INTEGRATION_UPDATE
88
+ * - INTEGRATION_DELETE
89
+ */
90
+ GUILD_INTEGRATIONS = 16,
91
+ /**
92
+ * - WEBHOOKS_UPDATE
93
+ */
94
+ GUILD_WEBHOOKS = 32,
95
+ /**
96
+ * - INVITE_CREATE
97
+ * - INVITE_DELETE
98
+ */
99
+ GUILD_INVITES = 64,
100
+ /**
101
+ * - VOICE_STATE_UPDATE
102
+ */
103
+ GUILD_VOICE_STATES = 128,
104
+ /**
105
+ * - PRESENCE_UPDATE
106
+ */
107
+ GUILD_PRESENCES = 256,
108
+ /**
109
+ * - MESSAGE_CREATE
110
+ * - MESSAGE_UPDATE
111
+ * - MESSAGE_DELETE
112
+ * - MESSAGE_DELETE_BULK
113
+ */
114
+ GUILD_MESSAGES = 512,
115
+ /**
116
+ * - MESSAGE_REACTION_ADD
117
+ * - MESSAGE_REACTION_REMOVE
118
+ * - MESSAGE_REACTION_REMOVE_ALL
119
+ * - MESSAGE_REACTION_REMOVE_EMOJI
120
+ */
121
+ GUILD_MESSAGE_REACTIONS = 1024,
122
+ /**
123
+ * - TYPING_START
124
+ */
125
+ GUILD_MESSAGE_TYPING = 2048,
126
+ /**
127
+ * - MESSAGE_CREATE
128
+ * - MESSAGE_UPDATE
129
+ * - MESSAGE_DELETE
130
+ * - CHANNEL_PINS_UPDATE
131
+ */
132
+ DIRECT_MESSAGES = 4096,
133
+ /**
134
+ * - MESSAGE_REACTION_ADD
135
+ * - MESSAGE_REACTION_REMOVE
136
+ * - MESSAGE_REACTION_REMOVE_ALL
137
+ * - MESSAGE_REACTION_REMOVE_EMOJI
138
+ */
139
+ DIRECT_MESSAGE_REACTIONS = 8192,
140
+ /**
141
+ * - TYPING_START
142
+ */
143
+ DIRECT_MESSAGE_TYPING = 16384
144
+ }
145
+ export interface GatewayParams {
146
+ [GatewayOpcode.HELLO]: HelloParams;
147
+ [GatewayOpcode.IDENTIFY]: IdentifyParams;
148
+ [GatewayOpcode.RESUME]: ResumeParams;
149
+ [GatewayOpcode.REQUEST_GUILD_MEMBERS]: RequestGuildMembersParams;
150
+ [GatewayOpcode.VOICE_STATE_UPDATE]: VoiceStateUpdateParams;
151
+ [GatewayOpcode.PRESENCE_UPDATE]: PresenceUpdateParams;
152
+ }
153
+ /** https://discord.com/developers/docs/topics/gateway#commands-and-events-gateway-events */
154
+ export interface GatewayEvents {
155
+ }
156
+ /** https://discord.com/developers/docs/topics/gateway#identify-identify-structure */
157
+ export interface IdentifyParams {
158
+ /** authentication token */
159
+ token: string;
160
+ /** connection properties */
161
+ properties: object;
162
+ /** whether this connection supports compression of packets */
163
+ compress?: boolean;
164
+ /** value between 50 and 250, total number of members where the gateway will stop sending offline members in the guild member list */
165
+ large_threshold?: integer;
166
+ /** used for Guild Sharding */
167
+ shard?: [shard_id: integer, num_shards: integer];
168
+ /** presence structure for initial presence information */
169
+ presence?: PresenceUpdateParams;
170
+ /** the Gateway Intents you wish to receive */
171
+ intents: integer;
172
+ }
173
+ /** https://discord.com/developers/docs/topics/gateway#resume-resume-structure */
174
+ export interface ResumeParams {
175
+ /** session token */
176
+ token: string;
177
+ /** session id */
178
+ session_id: string;
179
+ /** last sequence number received */
180
+ seq: integer;
181
+ }
182
+ /** https://discord.com/developers/docs/topics/gateway#request-guild-members-guild-request-members-structure */
183
+ export interface RequestGuildMembersParams {
184
+ /** id of the guild to get members for */
185
+ guild_id: snowflake;
186
+ /** string that username starts with, or an empty string to return all members */
187
+ query?: string;
188
+ /** maximum number of members to send matching the query; a limit of 0 can be used with an empty string query to return all members */
189
+ limit: integer;
190
+ /** used to specify if we want the presences of the matched members */
191
+ presences?: boolean;
192
+ /** used to specify which users you wish to fetch */
193
+ user_ids?: snowflake | snowflake[];
194
+ /** nonce to identify the Guild Members Chunk response */
195
+ nonce?: string;
196
+ }
197
+ /** https://discord.com/developers/docs/topics/gateway#update-voice-state-gateway-voice-state-update-structure */
198
+ export interface VoiceStateUpdateParams {
199
+ /** id of the guild */
200
+ guild_id: snowflake;
201
+ /** id of the voice channel client wants to join (null if disconnecting) */
202
+ channel_id?: snowflake;
203
+ /** is the client muted */
204
+ self_mute: boolean;
205
+ /** is the client deafened */
206
+ self_deaf: boolean;
207
+ }
208
+ /** https://discord.com/developers/docs/topics/gateway#update-presence-gateway-presence-update-structure */
209
+ export interface PresenceUpdateParams {
210
+ /** unix time (in milliseconds) of when the client went idle, or null if the client is not idle */
211
+ since?: integer;
212
+ /** the user's activities */
213
+ activities: Activity[];
214
+ /** the user's new status */
215
+ status: StatusType;
216
+ /** whether or not the client is afk */
217
+ afk: boolean;
218
+ }
219
+ /** https://discord.com/developers/docs/topics/gateway#hello-hello-structure */
220
+ export interface HelloParams {
221
+ /** the interval (in milliseconds) the client should heartbeat with */
222
+ heartbeat_interval: integer;
223
+ }
224
+ /** https://discord.com/developers/docs/topics/gateway#session-start-limit-object-session-start-limit-structure */
225
+ export interface SessionStartLimit {
226
+ /** The total number of session starts the current user is allowed */
227
+ total: integer;
228
+ /** The remaining number of session starts the current user is allowed */
229
+ remaining: integer;
230
+ /** The number of milliseconds after which the limit resets */
231
+ reset_after: integer;
232
+ /** The number of identify requests allowed per 5 seconds */
233
+ max_concurrency: integer;
234
+ }
235
+ declare module './internal' {
236
+ interface Internal {
237
+ /** https://discord.com/developers/docs/topics/gateway#get-gateway */
238
+ getGateway(): Promise<any>;
239
+ /** https://discord.com/developers/docs/topics/gateway#get-gateway-bot */
240
+ getGatewayBot(): Promise<any>;
241
+ }
242
+ }
@@ -0,0 +1,110 @@
1
+ import { integer, PresenceUpdateParams, snowflake, timestamp, User } from '.';
2
+ /** https://discord.com/developers/docs/resources/guild#guild-member-object-guild-member-structure */
3
+ export interface GuildMember {
4
+ /** the user this guild member represents */
5
+ user?: User;
6
+ /** this users guild nickname */
7
+ nick?: string;
8
+ /** the member's guild avatar hash */
9
+ avatar?: string;
10
+ /** array of role object ids */
11
+ roles: snowflake[];
12
+ /** when the user joined the guild */
13
+ joined_at: timestamp;
14
+ /** when the user started boosting the guild */
15
+ premium_since?: timestamp;
16
+ /** whether the user is deafened in voice channels */
17
+ deaf: boolean;
18
+ /** whether the user is muted in voice channels */
19
+ mute: boolean;
20
+ /** whether the user has not yet passed the guild's Membership Screening requirements */
21
+ pending?: boolean;
22
+ /** total permissions of the member in the channel, including overwrites, returned when in the interaction object */
23
+ permissions?: string;
24
+ }
25
+ /** https://discord.com/developers/docs/topics/gateway#guild-member-add-guild-member-add-extra-fields */
26
+ export interface GuildMemberAddEvent extends GuildMember {
27
+ /** id of the guild */
28
+ guild_id: snowflake;
29
+ }
30
+ /** https://discord.com/developers/docs/topics/gateway#guild-member-remove-guild-member-remove-event-fields */
31
+ export interface GuildMemberRemoveEvent {
32
+ /** the id of the guild */
33
+ guild_id: snowflake;
34
+ /** the user who was removed */
35
+ user: User;
36
+ }
37
+ /** https://discord.com/developers/docs/topics/gateway#guild-member-update-guild-member-update-event-fields */
38
+ export interface GuildMemberUpdateEvent {
39
+ /** the id of the guild */
40
+ guild_id: snowflake;
41
+ /** user role ids */
42
+ roles: snowflake[];
43
+ /** the user */
44
+ user: User;
45
+ /** nickname of the user in the guild */
46
+ nick?: string;
47
+ /** the member's guild avatar hash */
48
+ avatar?: string;
49
+ /** when the user joined the guild */
50
+ joined_at?: timestamp;
51
+ /** when the user starting boosting the guild */
52
+ premium_since?: timestamp;
53
+ /** whether the user is deafened in voice channels */
54
+ deaf?: boolean;
55
+ /** whether the user is muted in voice channels */
56
+ mute?: boolean;
57
+ /** whether the user has not yet passed the guild's Membership Screening requirements */
58
+ pending?: boolean;
59
+ }
60
+ /** https://discord.com/developers/docs/topics/gateway#guild-members-chunk-guild-members-chunk-event-fields */
61
+ export interface GuildMembersChunkEvent {
62
+ /** the id of the guild */
63
+ guild_id: snowflake;
64
+ /** set of guild members */
65
+ members: GuildMember[];
66
+ /** the chunk index in the expected chunks for this response (0 <= chunk_index < chunk_count) */
67
+ chunk_index: integer;
68
+ /** the total number of expected chunks for this response */
69
+ chunk_count: integer;
70
+ /** if passing an invalid id to REQUEST_GUILD_MEMBERS, it will be returned here */
71
+ not_found?: snowflake[];
72
+ /** if passing true to REQUEST_GUILD_MEMBERS, presences of the returned members will be here */
73
+ presences?: PresenceUpdateParams[];
74
+ /** the nonce used in the Guild Members Request */
75
+ nonce?: string;
76
+ }
77
+ declare module './gateway' {
78
+ interface GatewayEvents {
79
+ /** new user joined a guild */
80
+ GUILD_MEMBER_ADD: GuildMemberAddEvent;
81
+ /** user was removed from a guild */
82
+ GUILD_MEMBER_REMOVE: GuildMemberRemoveEvent;
83
+ /** guild member was updated */
84
+ GUILD_MEMBER_UPDATE: GuildMemberUpdateEvent;
85
+ /** response to Request Guild Members */
86
+ GUILD_MEMBERS_CHUNK: GuildMembersChunkEvent;
87
+ }
88
+ }
89
+ export interface ListGuildMembersOptions {
90
+ /** max number of members to return (1-1000) */
91
+ limit?: integer;
92
+ /** the highest user id in the previous page */
93
+ after?: snowflake;
94
+ }
95
+ export interface SearchGuildMembersOptions {
96
+ /** query string to match username(s) and nickname(s) against */
97
+ query: string;
98
+ /** max number of members to return (1-1000) */
99
+ limit?: integer;
100
+ }
101
+ declare module './internal' {
102
+ interface Internal {
103
+ /** https://discord.com/developers/docs/resources/guild#get-guild-member */
104
+ getGuildMember(guild_id: snowflake, user_id: snowflake): Promise<GuildMember>;
105
+ /** https://discord.com/developers/docs/resources/guild#list-guild-members */
106
+ listGuildMembers(guild_id: snowflake, options?: ListGuildMembersOptions): Promise<GuildMember[]>;
107
+ /** https://discord.com/developers/docs/resources/guild#search-guild-members */
108
+ searchGuildMembers(guild_id: snowflake, options: SearchGuildMembersOptions): Promise<GuildMember[]>;
109
+ }
110
+ }
@@ -0,0 +1,26 @@
1
+ import { Guild, integer, snowflake, timestamp, User } from '.';
2
+ /** https://discord.com/developers/docs/resources/guild-template#guild-template-object-guild-template-structure */
3
+ export interface GuildTemplate {
4
+ /** the template code (unique ID) */
5
+ code: string;
6
+ /** template name */
7
+ name: string;
8
+ /** the description for the template */
9
+ description?: string;
10
+ /** number of times this template has been used */
11
+ usage_count: integer;
12
+ /** the ID of the user who created the template */
13
+ creator_id: snowflake;
14
+ /** the user who created the template */
15
+ creator: User;
16
+ /** when this template was created */
17
+ created_at: timestamp;
18
+ /** when this template was last synced to the source guild */
19
+ updated_at: timestamp;
20
+ /** the ID of the guild this template is based on */
21
+ source_guild_id: snowflake;
22
+ /** the guild snapshot this template contains */
23
+ serialized_source_guild: Partial<Guild>;
24
+ /** whether the template has unsynced changes */
25
+ is_dirty?: boolean;
26
+ }