lunibee 0.1.5 → 0.1.7
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/README.md +13 -24
- package/dist/builders/commands.d.ts +37 -0
- package/dist/builders/components.d.ts +127 -12
- package/dist/builders/embed.d.ts +3 -1
- package/dist/builders/index.d.ts +2 -2
- package/dist/builders/index.js +319 -16
- package/dist/builders/index.js.map +8 -7
- package/dist/collection/index.d.ts +36 -0
- package/dist/collection/index.js +110 -6
- package/dist/collection/index.js.map +4 -4
- package/dist/core/events.d.ts +69 -3
- package/dist/core/index.d.ts +158 -90
- package/dist/core/index.js +1543 -1169
- package/dist/core/index.js.map +24 -23
- package/dist/core/permissions.d.ts +112 -53
- package/dist/formatters/index.d.ts +43 -3
- package/dist/formatters/index.js +64 -1
- package/dist/formatters/index.js.map +3 -3
- package/dist/handlers/index.js.map +2 -2
- package/dist/index.d.ts +5 -4
- package/dist/index.js +3882 -1588
- package/dist/index.js.map +43 -35
- package/dist/managers/emoji.d.ts +38 -0
- package/dist/managers/guild.d.ts +141 -0
- package/dist/managers/index.d.ts +86 -75
- package/dist/managers/index.js +1084 -67
- package/dist/managers/index.js.map +21 -16
- package/dist/managers/message.d.ts +7 -12
- package/dist/managers/user.d.ts +20 -0
- package/dist/rest/index.d.ts +173 -1
- package/dist/rest/index.js +343 -47
- package/dist/rest/index.js.map +8 -6
- package/dist/rest/redis.d.ts +37 -0
- package/dist/rest/routes.d.ts +26 -1
- package/dist/rest/store.d.ts +38 -0
- package/dist/rest/webhook.d.ts +2 -2
- package/dist/sharding/cluster.d.ts +61 -0
- package/dist/sharding/index.d.ts +8 -0
- package/dist/sharding/index.js +289 -18
- package/dist/sharding/index.js.map +8 -7
- package/dist/structures/audit-log.d.ts +26 -0
- package/dist/structures/base.d.ts +131 -48
- package/dist/structures/embed.d.ts +65 -0
- package/dist/structures/index.d.ts +74 -26
- package/dist/structures/index.js +1528 -59
- package/dist/structures/index.js.map +14 -8
- package/dist/structures/interactions.d.ts +72 -17
- package/dist/structures/resources.d.ts +199 -7
- package/dist/types/index.d.ts +605 -84
- package/dist/types/index.js +71 -1
- package/dist/types/index.js.map +3 -3
- package/dist/utils/index.js.map +2 -2
- package/dist/voice/index.d.ts +88 -0
- package/dist/voice/index.js +204 -5
- package/dist/voice/index.js.map +3 -3
- package/dist/ws/index.d.ts +40 -1
- package/dist/ws/index.js +105 -18
- package/dist/ws/index.js.map +4 -4
- package/package.json +16 -16
- package/dist/structures/permissions.d.ts +0 -73
|
@@ -6,16 +6,7 @@ export declare const InteractionType: {
|
|
|
6
6
|
readonly ApplicationCommandAutocomplete: 4;
|
|
7
7
|
readonly ModalSubmit: 5;
|
|
8
8
|
};
|
|
9
|
-
|
|
10
|
-
export declare const InteractionResponseType: {
|
|
11
|
-
readonly Pong: 1;
|
|
12
|
-
readonly ChannelMessage: 4;
|
|
13
|
-
readonly DeferredChannelMessage: 5;
|
|
14
|
-
readonly DeferredMessageUpdate: 6;
|
|
15
|
-
readonly MessageUpdate: 7;
|
|
16
|
-
readonly Autocomplete: 8;
|
|
17
|
-
readonly Modal: 9;
|
|
18
|
-
};
|
|
9
|
+
export { InteractionResponseType } from "@lunibee/types";
|
|
19
10
|
/** Data shared by Discord interactions. */
|
|
20
11
|
export interface InteractionData {
|
|
21
12
|
/** Interaction identifier. */ id: string;
|
|
@@ -44,6 +35,58 @@ export interface InteractionClient {
|
|
|
44
35
|
/** Deletes the original interaction response. @param token Interaction token. @returns Promise fulfilled after deletion. @throws {Error} When REST fails. */ deleteInteractionReply(token: string): Promise<void>;
|
|
45
36
|
/** Sends a follow-up interaction webhook message. @param token Interaction token. @param data Message payload. @returns Discord response. @throws {Error} When REST fails. */ followUpInteraction(token: string, data: InteractionReplyOptions): Promise<unknown>;
|
|
46
37
|
}
|
|
38
|
+
/** Raw Discord application command interaction data option. */
|
|
39
|
+
export interface APIInteractionDataOption {
|
|
40
|
+
name: string;
|
|
41
|
+
type: number;
|
|
42
|
+
value?: string | number | boolean;
|
|
43
|
+
options?: APIInteractionDataOption[];
|
|
44
|
+
focused?: boolean;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Typed resolver for application command options.
|
|
48
|
+
* Attached as `CommandInteraction.options`.
|
|
49
|
+
*/
|
|
50
|
+
export declare class CommandOptions {
|
|
51
|
+
#private;
|
|
52
|
+
/** @internal */
|
|
53
|
+
constructor(options: APIInteractionDataOption[], resolved?: Record<string, unknown>);
|
|
54
|
+
/** Returns the invoked subcommand name, or null if none. */
|
|
55
|
+
getSubcommand(required?: false): string | null;
|
|
56
|
+
getSubcommand(required: true): string;
|
|
57
|
+
/** Returns the invoked subcommand group name, or null if none. */
|
|
58
|
+
getSubcommandGroup(required?: false): string | null;
|
|
59
|
+
getSubcommandGroup(required: true): string;
|
|
60
|
+
/** Gets a string option. @param name Option name. @param required If true, throws when missing. */
|
|
61
|
+
getString(name: string, required?: false): string | null;
|
|
62
|
+
getString(name: string, required: true): string;
|
|
63
|
+
/** Gets an integer option. @param name Option name. @param required If true, throws when missing. */
|
|
64
|
+
getInteger(name: string, required?: false): number | null;
|
|
65
|
+
getInteger(name: string, required: true): number;
|
|
66
|
+
/** Gets a number (float) option. @param name Option name. @param required If true, throws when missing. */
|
|
67
|
+
getNumber(name: string, required?: false): number | null;
|
|
68
|
+
getNumber(name: string, required: true): number;
|
|
69
|
+
/** Gets a boolean option. @param name Option name. @param required If true, throws when missing. */
|
|
70
|
+
getBoolean(name: string, required?: false): boolean | null;
|
|
71
|
+
getBoolean(name: string, required: true): boolean;
|
|
72
|
+
/** Gets the raw resolved user data for a user option. @param name Option name. @param required If true, throws when missing. */
|
|
73
|
+
getUser(name: string, required?: false): Record<string, unknown> | null;
|
|
74
|
+
getUser(name: string, required: true): Record<string, unknown>;
|
|
75
|
+
/** Gets the raw resolved channel data for a channel option. @param name Option name. @param required If true, throws when missing. */
|
|
76
|
+
getChannel(name: string, required?: false): Record<string, unknown> | null;
|
|
77
|
+
getChannel(name: string, required: true): Record<string, unknown>;
|
|
78
|
+
/** Gets the raw resolved role data for a role option. @param name Option name. @param required If true, throws when missing. */
|
|
79
|
+
getRole(name: string, required?: false): Record<string, unknown> | null;
|
|
80
|
+
getRole(name: string, required: true): Record<string, unknown>;
|
|
81
|
+
/** Gets the raw resolved user or role data for a mentionable option. @param name Option name. @param required If true, throws when missing. */
|
|
82
|
+
getMentionable(name: string, required?: false): Record<string, unknown> | null;
|
|
83
|
+
getMentionable(name: string, required: true): Record<string, unknown>;
|
|
84
|
+
/** Gets the raw resolved attachment data for an attachment option. @param name Option name. @param required If true, throws when missing. */
|
|
85
|
+
getAttachment(name: string, required?: false): Record<string, unknown> | null;
|
|
86
|
+
getAttachment(name: string, required: true): Record<string, unknown>;
|
|
87
|
+
/** Returns the raw option list for advanced use cases. */
|
|
88
|
+
get raw(): readonly APIInteractionDataOption[];
|
|
89
|
+
}
|
|
47
90
|
/** A Discord interaction callback payload. */
|
|
48
91
|
export declare class InteractionResponse {
|
|
49
92
|
readonly type: number;
|
|
@@ -73,8 +116,8 @@ export declare class Interaction<TData extends InteractionData = InteractionData
|
|
|
73
116
|
/** Creates an interaction from a Gateway payload. @param client Interaction transport. @param data Gateway interaction payload. @throws {TypeError} If required identifiers are missing. */ constructor(client: InteractionClient, data: TData);
|
|
74
117
|
/** Whether this interaction is an application command. @returns True for application command interactions. */ isChatInputCommand(): this is CommandInteraction;
|
|
75
118
|
/** Whether this interaction is a message component. @returns True for component interactions. */ isMessageComponent(): this is ComponentInteraction;
|
|
76
|
-
/** Whether this interaction is a modal submission. @returns True for modal submissions. */ isModalSubmit(): this is
|
|
77
|
-
/** Whether this interaction is autocomplete. @returns True for autocomplete interactions. */ isAutocomplete(): this is
|
|
119
|
+
/** Whether this interaction is a modal submission. @returns True for modal submissions. */ isModalSubmit(): this is ModalSubmitInteraction;
|
|
120
|
+
/** Whether this interaction is autocomplete. @returns True for autocomplete interactions. */ isAutocomplete(): this is AutocompleteInteraction;
|
|
78
121
|
/** Ensures the interaction has not already been acknowledged. @returns Nothing. @throws {Error} When already acknowledged. */ protected assertUnacknowledged(): void;
|
|
79
122
|
/** Ensures the interaction has been acknowledged. @returns Nothing. @throws {Error} When not acknowledged. */ protected assertAcknowledged(): void;
|
|
80
123
|
/** Posts a raw interaction response callback. */
|
|
@@ -93,9 +136,12 @@ export declare class Interaction<TData extends InteractionData = InteractionData
|
|
|
93
136
|
[key: string]: unknown;
|
|
94
137
|
}): Promise<unknown>;
|
|
95
138
|
}
|
|
96
|
-
/** Application command interaction. */
|
|
139
|
+
/** Application command interaction with fully typed option resolver. */
|
|
97
140
|
export declare class CommandInteraction extends Interaction {
|
|
141
|
+
/** Typed option resolver. Access slash command options with full type safety. */
|
|
142
|
+
readonly options: CommandOptions;
|
|
98
143
|
/** Invoked command name. @returns Command name or an empty string. */ get commandName(): string;
|
|
144
|
+
constructor(client: InteractionClient, data: InteractionData);
|
|
99
145
|
}
|
|
100
146
|
/** Message component interaction. */
|
|
101
147
|
export declare class ComponentInteraction extends Interaction {
|
|
@@ -110,14 +156,14 @@ export declare class ComponentInteraction extends Interaction {
|
|
|
110
156
|
/** Updates the message to which the component was attached. */
|
|
111
157
|
update(options: InteractionReplyOptions | string): Promise<unknown>;
|
|
112
158
|
}
|
|
113
|
-
/** Creates a specialized interaction structure for a Gateway payload. @param client Interaction transport. @param data Gateway interaction payload. @returns Specialized interaction structure. @throws {TypeError} If required identifiers are missing. */
|
|
114
|
-
export declare function createInteraction(client: InteractionClient, data: InteractionData): Interaction;
|
|
115
159
|
/** Represents a Discord modal submission interaction. */
|
|
116
160
|
export declare class ModalSubmitInteraction extends Interaction {
|
|
117
161
|
/** Gets the submitted modal custom ID. */
|
|
118
162
|
get customId(): string;
|
|
119
|
-
/** Retrieves the text value for a specific text input custom ID. */
|
|
163
|
+
/** Retrieves the text value for a specific text input custom ID. @param customId The custom_id of the text input component. @returns The submitted text, or undefined if not found. */
|
|
120
164
|
getInputValue(customId: string): string | undefined;
|
|
165
|
+
/** Retrieves the text value for a text input, throwing if missing. @param customId The custom_id of the text input component. @returns The submitted text. @throws {TypeError} If the field is not found. */
|
|
166
|
+
getRequiredInputValue(customId: string): string;
|
|
121
167
|
}
|
|
122
168
|
/** Represents a Discord slash command autocomplete interaction. */
|
|
123
169
|
export declare class AutocompleteInteraction extends Interaction {
|
|
@@ -127,10 +173,19 @@ export declare class AutocompleteInteraction extends Interaction {
|
|
|
127
173
|
get focusedOption(): {
|
|
128
174
|
name: string;
|
|
129
175
|
value: unknown;
|
|
176
|
+
type: number;
|
|
130
177
|
} | undefined;
|
|
131
|
-
/** Responds to Discord with autocomplete choices. */
|
|
178
|
+
/** Responds to Discord with autocomplete choices. @param choices Array of name/value pairs to show. @throws {TypeError} If choices is not an array. */
|
|
132
179
|
respond(choices: {
|
|
133
180
|
name: string;
|
|
134
181
|
value: string | number;
|
|
135
182
|
}[]): Promise<void>;
|
|
136
183
|
}
|
|
184
|
+
/**
|
|
185
|
+
* Creates a specialized interaction structure for a Gateway payload.
|
|
186
|
+
* @param client Interaction transport.
|
|
187
|
+
* @param data Gateway interaction payload.
|
|
188
|
+
* @returns Specialized interaction structure.
|
|
189
|
+
* @throws {TypeError} If required identifiers are missing.
|
|
190
|
+
*/
|
|
191
|
+
export declare function createInteraction(client: InteractionClient, data: InteractionData): Interaction;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BaseStructure, Channel, User } from "./base.js";
|
|
2
|
-
import { PermissionsBitField } from "
|
|
2
|
+
import { PermissionsBitField } from "@lunibee/core";
|
|
3
|
+
import type { ImageURLOptions } from "./base.js";
|
|
3
4
|
/** A Discord guild member. */
|
|
4
5
|
export declare class GuildMember {
|
|
5
6
|
/** User represented by the member. */ readonly user: User;
|
|
@@ -9,6 +10,10 @@ export declare class GuildMember {
|
|
|
9
10
|
/** Whether the member is pending membership screening. */ pending: boolean;
|
|
10
11
|
/** Member join timestamp. */ joinedAt?: Date;
|
|
11
12
|
/** Raw effective permission bitfield supplied by Discord. */ readonly permissions: PermissionsBitField;
|
|
13
|
+
/** Member-specific avatar hash, if set. */ avatarHash: string | null;
|
|
14
|
+
/** When the member started boosting the guild. */ premiumSince: Date | null;
|
|
15
|
+
/** When the member's timeout expires (null if not timed out). */ timedOutUntil: Date | null;
|
|
16
|
+
/** Member flags bitfield. */ flags: number;
|
|
12
17
|
/** Creates a guild member from Discord data. @param data Discord guild-member payload. @throws {TypeError} If the guild ID is invalid. @throws {RangeError} If joined_at is invalid. */
|
|
13
18
|
constructor(data: {
|
|
14
19
|
user: {
|
|
@@ -19,6 +24,7 @@ export declare class GuildMember {
|
|
|
19
24
|
bot?: boolean;
|
|
20
25
|
system?: boolean;
|
|
21
26
|
public_flags?: number;
|
|
27
|
+
discriminator?: string;
|
|
22
28
|
};
|
|
23
29
|
guild_id: string;
|
|
24
30
|
nick?: string | null;
|
|
@@ -26,17 +32,34 @@ export declare class GuildMember {
|
|
|
26
32
|
pending?: boolean;
|
|
27
33
|
joined_at?: string;
|
|
28
34
|
permissions?: string;
|
|
35
|
+
avatar?: string | null;
|
|
36
|
+
premium_since?: string | null;
|
|
37
|
+
communication_disabled_until?: string | null;
|
|
38
|
+
flags?: number;
|
|
29
39
|
});
|
|
30
|
-
/** Effective member display name
|
|
40
|
+
/** Effective member display name — nickname, falling back to user display name. */
|
|
41
|
+
get displayName(): string;
|
|
42
|
+
/** Whether this member is currently timed out. */
|
|
43
|
+
get isTimedOut(): boolean;
|
|
44
|
+
/** Returns the member-specific avatar URL, falling back to the user's avatar, or null if none. */
|
|
45
|
+
avatarURL(options?: ImageURLOptions): string | null;
|
|
46
|
+
/** Returns the resolved avatar URL — member avatar, user avatar, or default. */
|
|
47
|
+
displayAvatarURL(options?: ImageURLOptions): string;
|
|
48
|
+
/** Returns the Discord user mention for this member. */
|
|
49
|
+
toString(): string;
|
|
31
50
|
}
|
|
32
51
|
/** A Discord guild role. */
|
|
33
52
|
export declare class Role extends BaseStructure {
|
|
34
53
|
/** Role name. */ name: string;
|
|
35
|
-
/** Role color. */ color: number;
|
|
54
|
+
/** Role color as a 24-bit RGB integer. */ color: number;
|
|
36
55
|
/** Whether the role is hoisted. */ hoist: boolean;
|
|
37
56
|
/** Permission bitfield. */ permissions: PermissionsBitField;
|
|
38
|
-
/** Whether the role is managed. */ managed: boolean;
|
|
57
|
+
/** Whether the role is managed by an integration. */ managed: boolean;
|
|
39
58
|
/** Whether the role is mentionable. */ mentionable: boolean;
|
|
59
|
+
/** Role position in the hierarchy. */ position: number;
|
|
60
|
+
/** Unicode emoji used as the role icon, if any. */ unicodeEmoji: string | null;
|
|
61
|
+
/** Hash of the role's custom icon image, if any. */ iconHash: string | null;
|
|
62
|
+
/** Role tags metadata (bot, premium subscriber, etc). */ tags: Record<string, unknown> | null;
|
|
40
63
|
/** Creates a role from Discord data. @param data Discord role payload. */
|
|
41
64
|
constructor(data: {
|
|
42
65
|
id: string;
|
|
@@ -46,12 +69,22 @@ export declare class Role extends BaseStructure {
|
|
|
46
69
|
permissions?: string;
|
|
47
70
|
managed?: boolean;
|
|
48
71
|
mentionable?: boolean;
|
|
72
|
+
position?: number;
|
|
73
|
+
unicode_emoji?: string | null;
|
|
74
|
+
icon?: string | null;
|
|
75
|
+
tags?: Record<string, unknown> | null;
|
|
49
76
|
});
|
|
50
|
-
/**
|
|
77
|
+
/** Returns the role's color as a `#RRGGBB` hex string. Returns `#000000` for colorless roles. */
|
|
78
|
+
get colorHex(): string;
|
|
79
|
+
/** Returns the role's custom icon URL, or null if the role has no icon. */
|
|
80
|
+
iconURL(options?: ImageURLOptions): string | null;
|
|
81
|
+
/** Whether this is the @everyone base role (its ID equals the guild ID). */
|
|
82
|
+
isEveryone(guildId: string): boolean;
|
|
83
|
+
/** Discord role mention string. Used automatically in template literals. */
|
|
84
|
+
toString(): string;
|
|
51
85
|
}
|
|
52
86
|
/** A Discord text-capable channel. */
|
|
53
87
|
export declare class TextChannel extends Channel {
|
|
54
|
-
/** Parent category ID. */ parentId?: string | null;
|
|
55
88
|
/** Creates a text channel from Discord data. @param data Discord channel payload. */
|
|
56
89
|
constructor(data: {
|
|
57
90
|
id: string;
|
|
@@ -59,6 +92,165 @@ export declare class TextChannel extends Channel {
|
|
|
59
92
|
name?: string;
|
|
60
93
|
parent_id?: string | null;
|
|
61
94
|
guild_id?: string;
|
|
95
|
+
}, context?: import("./base.js").ResourceContext);
|
|
96
|
+
/** Discord channel mention string. Used automatically in template literals. */
|
|
97
|
+
toString(): string;
|
|
98
|
+
}
|
|
99
|
+
/** A Discord invite link and its metadata. */
|
|
100
|
+
export declare class Invite {
|
|
101
|
+
/** Invite code (the unique part of the URL). */ readonly code: string;
|
|
102
|
+
/** Guild this invite belongs to, if any. */ readonly guildId: string | null;
|
|
103
|
+
/** Channel this invite points to, if any. */ readonly channelId: string | null;
|
|
104
|
+
/** User who created the invite, if available. */ readonly inviter: User | null;
|
|
105
|
+
/** Number of times the invite has been used. */ uses: number;
|
|
106
|
+
/** Maximum number of uses (0 = unlimited). */ maxUses: number;
|
|
107
|
+
/** Duration in seconds until the invite expires (0 = never). */ maxAge: number;
|
|
108
|
+
/** Whether the invite is temporary (kicks uninducted members on disconnect). */ temporary: boolean;
|
|
109
|
+
/** When the invite was created. */ readonly createdAt: Date | null;
|
|
110
|
+
/** When the invite expires, or null if it never expires. */ readonly expiresAt: Date | null;
|
|
111
|
+
/** Creates an invite from Discord data. */
|
|
112
|
+
constructor(data: {
|
|
113
|
+
code: string;
|
|
114
|
+
guild?: {
|
|
115
|
+
id: string;
|
|
116
|
+
} | null;
|
|
117
|
+
channel?: {
|
|
118
|
+
id: string;
|
|
119
|
+
} | null;
|
|
120
|
+
inviter?: {
|
|
121
|
+
id: string;
|
|
122
|
+
username: string;
|
|
123
|
+
global_name?: string | null;
|
|
124
|
+
avatar?: string | null;
|
|
125
|
+
bot?: boolean;
|
|
126
|
+
system?: boolean;
|
|
127
|
+
public_flags?: number;
|
|
128
|
+
discriminator?: string;
|
|
129
|
+
} | null;
|
|
130
|
+
uses?: number;
|
|
131
|
+
max_uses?: number;
|
|
132
|
+
max_age?: number;
|
|
133
|
+
temporary?: boolean;
|
|
134
|
+
created_at?: string | null;
|
|
135
|
+
expires_at?: string | null;
|
|
136
|
+
});
|
|
137
|
+
/** The full invite URL. */
|
|
138
|
+
get url(): string;
|
|
139
|
+
/** Returns the invite URL. Used automatically in template literals. */
|
|
140
|
+
toString(): string;
|
|
141
|
+
}
|
|
142
|
+
/** Webhook type constants. */
|
|
143
|
+
export declare const WebhookType: {
|
|
144
|
+
readonly Incoming: 1;
|
|
145
|
+
readonly ChannelFollower: 2;
|
|
146
|
+
readonly Application: 3;
|
|
147
|
+
};
|
|
148
|
+
/** A Discord webhook — an HTTP endpoint that can post messages to a channel. */
|
|
149
|
+
export declare class Webhook extends BaseStructure {
|
|
150
|
+
/** Webhook type. */ readonly type: number;
|
|
151
|
+
/** Webhook display name. */ name: string | null;
|
|
152
|
+
/** Webhook avatar hash. */ avatarHash: string | null;
|
|
153
|
+
/** Channel this webhook posts to. */ readonly channelId: string | null;
|
|
154
|
+
/** Guild this webhook belongs to. */ readonly guildId: string | null;
|
|
155
|
+
/** Application that created this webhook, if any. */ readonly applicationId: string | null;
|
|
156
|
+
/** Webhook token (only present for incoming webhooks). */ readonly token: string | null;
|
|
157
|
+
/** Creates a webhook from Discord data. */
|
|
158
|
+
constructor(data: {
|
|
159
|
+
id: string;
|
|
160
|
+
type?: number;
|
|
161
|
+
name?: string | null;
|
|
162
|
+
avatar?: string | null;
|
|
163
|
+
channel_id?: string | null;
|
|
164
|
+
guild_id?: string | null;
|
|
165
|
+
application_id?: string | null;
|
|
166
|
+
token?: string;
|
|
167
|
+
});
|
|
168
|
+
/** Returns the webhook avatar URL, or null if no avatar is set. */
|
|
169
|
+
avatarURL(options?: ImageURLOptions): string | null;
|
|
170
|
+
/** Returns the webhook execution URL, or null if no token is set. */
|
|
171
|
+
get url(): string | null;
|
|
172
|
+
/** Returns the webhook URL or its ID as a string. */
|
|
173
|
+
toString(): string;
|
|
174
|
+
}
|
|
175
|
+
/** A Discord emoji. */
|
|
176
|
+
export declare class Emoji extends BaseStructure {
|
|
177
|
+
/** Emoji name. */ name: string | null;
|
|
178
|
+
/** Roles allowed to use this emoji. */ roleIds: string[];
|
|
179
|
+
/** User that created this emoji. */ user: User | null;
|
|
180
|
+
/** Whether this emoji must be wrapped in colons. */ requireColons: boolean;
|
|
181
|
+
/** Whether this emoji is managed. */ managed: boolean;
|
|
182
|
+
/** Whether this emoji is animated. */ animated: boolean;
|
|
183
|
+
/** Whether this emoji can be used, may be false due to loss of Server Boosts. */ available: boolean;
|
|
184
|
+
/** Creates an emoji from Discord data. */
|
|
185
|
+
constructor(data: {
|
|
186
|
+
id: string | null;
|
|
187
|
+
name: string | null;
|
|
188
|
+
roles?: string[];
|
|
189
|
+
user?: import("@lunibee/types").UserData;
|
|
190
|
+
require_colons?: boolean;
|
|
191
|
+
managed?: boolean;
|
|
192
|
+
animated?: boolean;
|
|
193
|
+
available?: boolean;
|
|
62
194
|
});
|
|
63
|
-
/**
|
|
195
|
+
/** Returns the URL for this emoji if it is custom, or null for unicode emojis. */
|
|
196
|
+
url(options?: ImageURLOptions): string | null;
|
|
197
|
+
/** Returns the text required to render this emoji in Discord. */
|
|
198
|
+
toString(): string;
|
|
199
|
+
}
|
|
200
|
+
/** A Discord AutoModeration Rule. */
|
|
201
|
+
export declare class AutoModerationRule extends BaseStructure {
|
|
202
|
+
guildId: string;
|
|
203
|
+
name: string;
|
|
204
|
+
creatorId: string;
|
|
205
|
+
eventType: number;
|
|
206
|
+
triggerType: number;
|
|
207
|
+
triggerMetadata: Record<string, unknown>;
|
|
208
|
+
actions: import("@lunibee/types").APIAutoModerationAction[];
|
|
209
|
+
enabled: boolean;
|
|
210
|
+
exemptRoles: string[];
|
|
211
|
+
exemptChannels: string[];
|
|
212
|
+
/** Creates an auto moderation rule from Discord data. */
|
|
213
|
+
constructor(data: import("@lunibee/types").APIAutoModerationRule);
|
|
214
|
+
toJSON(): Record<string, unknown>;
|
|
215
|
+
}
|
|
216
|
+
/** A channel listed in a guild's Welcome Screen. */
|
|
217
|
+
export declare class WelcomeScreenChannel {
|
|
218
|
+
channelId: string;
|
|
219
|
+
description: string;
|
|
220
|
+
emojiId: string | null;
|
|
221
|
+
emojiName: string | null;
|
|
222
|
+
constructor(data: import("@lunibee/types").APIWelcomeScreenChannel);
|
|
223
|
+
}
|
|
224
|
+
/** A Discord Guild Welcome Screen. */
|
|
225
|
+
export declare class GuildWelcomeScreen {
|
|
226
|
+
description: string | null;
|
|
227
|
+
channels: WelcomeScreenChannel[];
|
|
228
|
+
constructor(data: import("@lunibee/types").APIGuildWelcomeScreen);
|
|
229
|
+
}
|
|
230
|
+
/** An option within a Guild Onboarding Prompt. */
|
|
231
|
+
export declare class OnboardingPromptOption extends BaseStructure {
|
|
232
|
+
channelIds: string[];
|
|
233
|
+
roleIds: string[];
|
|
234
|
+
emoji: import("@lunibee/types").APIPartialEmoji | undefined;
|
|
235
|
+
title: string;
|
|
236
|
+
description: string | null;
|
|
237
|
+
constructor(data: import("@lunibee/types").APIOnboardingPromptOption);
|
|
238
|
+
}
|
|
239
|
+
/** A prompt shown during Guild Onboarding. */
|
|
240
|
+
export declare class OnboardingPrompt extends BaseStructure {
|
|
241
|
+
type: number;
|
|
242
|
+
options: OnboardingPromptOption[];
|
|
243
|
+
title: string;
|
|
244
|
+
singleSelect: boolean;
|
|
245
|
+
required: boolean;
|
|
246
|
+
inOnboarding: boolean;
|
|
247
|
+
constructor(data: import("@lunibee/types").APIOnboardingPrompt);
|
|
248
|
+
}
|
|
249
|
+
/** A Discord Guild Onboarding setup. */
|
|
250
|
+
export declare class GuildOnboarding extends BaseStructure {
|
|
251
|
+
prompts: OnboardingPrompt[];
|
|
252
|
+
defaultChannelIds: string[];
|
|
253
|
+
enabled: boolean;
|
|
254
|
+
mode: number;
|
|
255
|
+
constructor(data: import("@lunibee/types").APIGuildOnboarding);
|
|
64
256
|
}
|