@elizaos/plugin-discord 2.0.0-alpha.5 → 2.0.0-alpha.537
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/LICENSE +21 -0
- package/README.md +549 -0
- package/dist/accounts.d.ts +164 -0
- package/dist/accounts.d.ts.map +1 -0
- package/dist/actions/actionResultSemantics.d.ts +9 -0
- package/dist/actions/actionResultSemantics.d.ts.map +1 -0
- package/dist/actions/chatWithAttachments.d.ts +4 -0
- package/dist/actions/chatWithAttachments.d.ts.map +1 -0
- package/dist/actions/createPoll.d.ts +4 -0
- package/dist/actions/createPoll.d.ts.map +1 -0
- package/dist/actions/deleteMessage.d.ts +4 -0
- package/dist/actions/deleteMessage.d.ts.map +1 -0
- package/dist/actions/downloadMedia.d.ts +4 -0
- package/dist/actions/downloadMedia.d.ts.map +1 -0
- package/dist/actions/editMessage.d.ts +4 -0
- package/dist/actions/editMessage.d.ts.map +1 -0
- package/dist/actions/getUserInfo.d.ts +4 -0
- package/dist/actions/getUserInfo.d.ts.map +1 -0
- package/dist/actions/joinChannel.d.ts +4 -0
- package/dist/actions/joinChannel.d.ts.map +1 -0
- package/dist/actions/leaveChannel.d.ts +4 -0
- package/dist/actions/leaveChannel.d.ts.map +1 -0
- package/dist/actions/listChannels.d.ts +4 -0
- package/dist/actions/listChannels.d.ts.map +1 -0
- package/dist/actions/pinMessage.d.ts +4 -0
- package/dist/actions/pinMessage.d.ts.map +1 -0
- package/dist/actions/reactToMessage.d.ts +4 -0
- package/dist/actions/reactToMessage.d.ts.map +1 -0
- package/dist/actions/readChannel.d.ts +4 -0
- package/dist/actions/readChannel.d.ts.map +1 -0
- package/dist/actions/searchMessages.d.ts +4 -0
- package/dist/actions/searchMessages.d.ts.map +1 -0
- package/dist/actions/sendDM.d.ts +4 -0
- package/dist/actions/sendDM.d.ts.map +1 -0
- package/dist/actions/sendMessage.d.ts +4 -0
- package/dist/actions/sendMessage.d.ts.map +1 -0
- package/dist/actions/serverInfo.d.ts +4 -0
- package/dist/actions/serverInfo.d.ts.map +1 -0
- package/dist/actions/setup-credentials.d.ts +25 -0
- package/dist/actions/setup-credentials.d.ts.map +1 -0
- package/dist/actions/summarizeConversation.d.ts +4 -0
- package/dist/actions/summarizeConversation.d.ts.map +1 -0
- package/dist/actions/transcribeMedia.d.ts +4 -0
- package/dist/actions/transcribeMedia.d.ts.map +1 -0
- package/dist/actions/unpinMessage.d.ts +4 -0
- package/dist/actions/unpinMessage.d.ts.map +1 -0
- package/dist/allowlist.d.ts +198 -0
- package/dist/allowlist.d.ts.map +1 -0
- package/dist/attachments.d.ts +93 -0
- package/dist/attachments.d.ts.map +1 -0
- package/dist/banner.d.ts +39 -0
- package/dist/banner.d.ts.map +1 -0
- package/dist/compat.d.ts +57 -0
- package/dist/compat.d.ts.map +1 -0
- package/dist/config.d.ts +156 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/constants.d.ts +2 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/debouncer.d.ts +25 -0
- package/dist/debouncer.d.ts.map +1 -0
- package/dist/discord-commands.d.ts +16 -0
- package/dist/discord-commands.d.ts.map +1 -0
- package/dist/discord-events.d.ts +54 -0
- package/dist/discord-events.d.ts.map +1 -0
- package/dist/discord-history.d.ts +49 -0
- package/dist/discord-history.d.ts.map +1 -0
- package/dist/discord-interactions.d.ts +45 -0
- package/dist/discord-interactions.d.ts.map +1 -0
- package/dist/discord-local-service.d.ts +94 -0
- package/dist/discord-local-service.d.ts.map +1 -0
- package/dist/discord-reactions.d.ts +29 -0
- package/dist/discord-reactions.d.ts.map +1 -0
- package/dist/draft-chunking.d.ts +9 -0
- package/dist/draft-chunking.d.ts.map +1 -0
- package/dist/draft-stream.d.ts +23 -0
- package/dist/draft-stream.d.ts.map +1 -0
- package/dist/environment.d.ts +23 -0
- package/dist/environment.d.ts.map +1 -0
- package/dist/generated/prompts/typescript/prompts.d.ts +44 -0
- package/dist/generated/prompts/typescript/prompts.d.ts.map +1 -0
- package/dist/generated/specs/spec-helpers.d.ts +49 -0
- package/dist/generated/specs/spec-helpers.d.ts.map +1 -0
- package/dist/generated/specs/specs.d.ts +90 -0
- package/dist/generated/specs/specs.d.ts.map +1 -0
- package/dist/identity.d.ts +8 -0
- package/dist/identity.d.ts.map +1 -0
- package/dist/inbound-envelope.d.ts +8 -0
- package/dist/inbound-envelope.d.ts.map +1 -0
- package/dist/index.browser.d.ts +34 -0
- package/dist/index.browser.d.ts.map +1 -0
- package/dist/index.d.ts +19 -2
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +15379 -0
- package/dist/index.js.map +72 -0
- package/dist/messages.d.ts +62 -0
- package/dist/messages.d.ts.map +1 -0
- package/dist/messaging.d.ts +129 -0
- package/dist/messaging.d.ts.map +1 -0
- package/dist/native-commands.d.ts +142 -0
- package/dist/native-commands.d.ts.map +1 -0
- package/dist/owner-pairing-service.d.ts +73 -0
- package/dist/owner-pairing-service.d.ts.map +1 -0
- package/dist/permissionEvents.d.ts +42 -0
- package/dist/permissionEvents.d.ts.map +1 -0
- package/dist/permissions.d.ts +36 -0
- package/dist/permissions.d.ts.map +1 -0
- package/dist/profileSync.d.ts +8 -0
- package/dist/profileSync.d.ts.map +1 -0
- package/dist/providers/channelState.d.ts +14 -0
- package/dist/providers/channelState.d.ts.map +1 -0
- package/dist/providers/guildInfo.d.ts +15 -0
- package/dist/providers/guildInfo.d.ts.map +1 -0
- package/dist/providers/voiceState.d.ts +12 -0
- package/dist/providers/voiceState.d.ts.map +1 -0
- package/dist/reasoning-tags.d.ts +2 -0
- package/dist/reasoning-tags.d.ts.map +1 -0
- package/dist/service.d.ts +207 -0
- package/dist/service.d.ts.map +1 -0
- package/dist/setup-routes.d.ts +23 -0
- package/dist/setup-routes.d.ts.map +1 -0
- package/dist/slash-commands.d.ts +39 -0
- package/dist/slash-commands.d.ts.map +1 -0
- package/dist/status-reactions.d.ts +11 -0
- package/dist/status-reactions.d.ts.map +1 -0
- package/dist/test-setup.d.ts +1 -0
- package/dist/test-setup.d.ts.map +1 -0
- package/dist/tests.d.ts +123 -0
- package/dist/tests.d.ts.map +1 -0
- package/dist/types.d.ts +329 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/typing.d.ts +7 -0
- package/dist/typing.d.ts.map +1 -0
- package/dist/utils.d.ts +48 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/vitest.config.d.ts +3 -0
- package/dist/vitest.config.d.ts.map +1 -0
- package/dist/voice.d.ts +234 -0
- package/dist/voice.d.ts.map +1 -0
- package/package.json +25 -20
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,329 @@
|
|
|
1
|
+
import type { ChannelType, Character, EntityPayload, EventPayload, IAgentRuntime, Media, Memory, MessagePayload, ReplyToMode, WorldPayload } from "@elizaos/core";
|
|
2
|
+
import type { Channel, Client as DiscordJsClient, Guild, GuildMember, Interaction, Message, MessageReaction, User, VoiceState } from "discord.js";
|
|
3
|
+
/**
|
|
4
|
+
* Discord-specific event types
|
|
5
|
+
*/
|
|
6
|
+
export declare enum DiscordEventTypes {
|
|
7
|
+
MESSAGE_RECEIVED = "DISCORD_MESSAGE_RECEIVED",
|
|
8
|
+
MESSAGE_SENT = "DISCORD_MESSAGE_SENT",
|
|
9
|
+
SLASH_COMMAND = "DISCORD_SLASH_COMMAND",
|
|
10
|
+
MODAL_SUBMIT = "DISCORD_MODAL_SUBMIT",
|
|
11
|
+
REACTION_RECEIVED = "DISCORD_REACTION_RECEIVED",
|
|
12
|
+
REACTION_REMOVED = "DISCORD_REACTION_REMOVED",
|
|
13
|
+
WORLD_JOINED = "DISCORD_WORLD_JOINED",
|
|
14
|
+
WORLD_CONNECTED = "DISCORD_SERVER_CONNECTED",
|
|
15
|
+
ENTITY_JOINED = "DISCORD_USER_JOINED",
|
|
16
|
+
ENTITY_LEFT = "DISCORD_USER_LEFT",
|
|
17
|
+
VOICE_STATE_CHANGED = "DISCORD_VOICE_STATE_CHANGED",
|
|
18
|
+
CHANNEL_PERMISSIONS_CHANGED = "DISCORD_CHANNEL_PERMISSIONS_CHANGED",
|
|
19
|
+
ROLE_PERMISSIONS_CHANGED = "DISCORD_ROLE_PERMISSIONS_CHANGED",
|
|
20
|
+
MEMBER_ROLES_CHANGED = "DISCORD_MEMBER_ROLES_CHANGED",
|
|
21
|
+
ROLE_CREATED = "DISCORD_ROLE_CREATED",
|
|
22
|
+
ROLE_DELETED = "DISCORD_ROLE_DELETED",
|
|
23
|
+
LISTEN_CHANNEL_MESSAGE = "DISCORD_LISTEN_CHANNEL_MESSAGE",
|
|
24
|
+
NOT_IN_CHANNELS_MESSAGE = "DISCORD_NOT_IN_CHANNELS_MESSAGE"
|
|
25
|
+
}
|
|
26
|
+
export interface DiscordMessageReceivedPayload extends MessagePayload {
|
|
27
|
+
originalMessage: Message;
|
|
28
|
+
}
|
|
29
|
+
export interface DiscordMessageSentPayload extends MessagePayload {
|
|
30
|
+
originalMessages: Message[];
|
|
31
|
+
}
|
|
32
|
+
export interface DiscordReactionPayload extends MessagePayload {
|
|
33
|
+
originalReaction: MessageReaction;
|
|
34
|
+
user: User;
|
|
35
|
+
}
|
|
36
|
+
export interface DiscordServerPayload extends WorldPayload {
|
|
37
|
+
server: Guild;
|
|
38
|
+
}
|
|
39
|
+
export interface DiscordUserJoinedPayload extends EntityPayload {
|
|
40
|
+
member: GuildMember;
|
|
41
|
+
}
|
|
42
|
+
export interface DiscordUserLeftPayload extends EntityPayload {
|
|
43
|
+
member: GuildMember;
|
|
44
|
+
}
|
|
45
|
+
export interface DiscordVoiceStateChangedPayload {
|
|
46
|
+
voiceState: VoiceState;
|
|
47
|
+
}
|
|
48
|
+
export interface DiscordListenChannelPayload {
|
|
49
|
+
runtime: IAgentRuntime;
|
|
50
|
+
message: Memory;
|
|
51
|
+
source: string;
|
|
52
|
+
}
|
|
53
|
+
export interface DiscordNotInChannelsPayload {
|
|
54
|
+
runtime: IAgentRuntime;
|
|
55
|
+
message: Message;
|
|
56
|
+
source: string;
|
|
57
|
+
}
|
|
58
|
+
export type PermissionState = "ALLOW" | "DENY" | "NEUTRAL";
|
|
59
|
+
export interface PermissionDiff {
|
|
60
|
+
permission: string;
|
|
61
|
+
oldState: PermissionState;
|
|
62
|
+
newState: PermissionState;
|
|
63
|
+
}
|
|
64
|
+
export interface AuditInfo {
|
|
65
|
+
executorId: string;
|
|
66
|
+
executorTag: string;
|
|
67
|
+
reason: string | null;
|
|
68
|
+
}
|
|
69
|
+
export interface ChannelPermissionsChangedPayload extends EventPayload {
|
|
70
|
+
guild: {
|
|
71
|
+
id: string;
|
|
72
|
+
name: string;
|
|
73
|
+
};
|
|
74
|
+
channel: {
|
|
75
|
+
id: string;
|
|
76
|
+
name: string;
|
|
77
|
+
};
|
|
78
|
+
target: {
|
|
79
|
+
type: "role" | "user";
|
|
80
|
+
id: string;
|
|
81
|
+
name: string;
|
|
82
|
+
};
|
|
83
|
+
action: "CREATE" | "UPDATE" | "DELETE";
|
|
84
|
+
changes: PermissionDiff[];
|
|
85
|
+
audit: AuditInfo | null;
|
|
86
|
+
}
|
|
87
|
+
export interface RolePermissionsChangedPayload extends EventPayload {
|
|
88
|
+
guild: {
|
|
89
|
+
id: string;
|
|
90
|
+
name: string;
|
|
91
|
+
};
|
|
92
|
+
role: {
|
|
93
|
+
id: string;
|
|
94
|
+
name: string;
|
|
95
|
+
};
|
|
96
|
+
changes: PermissionDiff[];
|
|
97
|
+
audit: AuditInfo | null;
|
|
98
|
+
}
|
|
99
|
+
export interface MemberRolesChangedPayload extends EventPayload {
|
|
100
|
+
guild: {
|
|
101
|
+
id: string;
|
|
102
|
+
name: string;
|
|
103
|
+
};
|
|
104
|
+
member: {
|
|
105
|
+
id: string;
|
|
106
|
+
tag: string;
|
|
107
|
+
};
|
|
108
|
+
added: Array<{
|
|
109
|
+
id: string;
|
|
110
|
+
name: string;
|
|
111
|
+
permissions: string[];
|
|
112
|
+
}>;
|
|
113
|
+
removed: Array<{
|
|
114
|
+
id: string;
|
|
115
|
+
name: string;
|
|
116
|
+
permissions: string[];
|
|
117
|
+
}>;
|
|
118
|
+
audit: AuditInfo | null;
|
|
119
|
+
}
|
|
120
|
+
export interface RoleLifecyclePayload extends EventPayload {
|
|
121
|
+
guild: {
|
|
122
|
+
id: string;
|
|
123
|
+
name: string;
|
|
124
|
+
};
|
|
125
|
+
role: {
|
|
126
|
+
id: string;
|
|
127
|
+
name: string;
|
|
128
|
+
permissions: string[];
|
|
129
|
+
};
|
|
130
|
+
audit: AuditInfo | null;
|
|
131
|
+
}
|
|
132
|
+
export interface DiscordSlashCommand {
|
|
133
|
+
name: string;
|
|
134
|
+
description: string;
|
|
135
|
+
options?: Array<{
|
|
136
|
+
name: string;
|
|
137
|
+
type: number;
|
|
138
|
+
description: string;
|
|
139
|
+
required?: boolean;
|
|
140
|
+
channel_types?: number[];
|
|
141
|
+
}>;
|
|
142
|
+
guildOnly?: boolean;
|
|
143
|
+
bypassChannelWhitelist?: boolean;
|
|
144
|
+
requiredPermissions?: bigint | string | null;
|
|
145
|
+
contexts?: number[];
|
|
146
|
+
guildIds?: string[];
|
|
147
|
+
validator?: (interaction: Interaction, runtime: IAgentRuntime) => Promise<boolean>;
|
|
148
|
+
}
|
|
149
|
+
export interface DiscordRegisterCommandsPayload extends EventPayload {
|
|
150
|
+
commands: DiscordSlashCommand[];
|
|
151
|
+
}
|
|
152
|
+
export interface DiscordSlashCommandPayload extends EventPayload {
|
|
153
|
+
interaction: Interaction;
|
|
154
|
+
client: DiscordJsClient;
|
|
155
|
+
commands: DiscordSlashCommand[];
|
|
156
|
+
}
|
|
157
|
+
export interface DiscordEventPayloadMap {
|
|
158
|
+
[DiscordEventTypes.MESSAGE_RECEIVED]: DiscordMessageReceivedPayload;
|
|
159
|
+
[DiscordEventTypes.MESSAGE_SENT]: DiscordMessageSentPayload;
|
|
160
|
+
[DiscordEventTypes.REACTION_RECEIVED]: DiscordReactionPayload;
|
|
161
|
+
[DiscordEventTypes.REACTION_REMOVED]: DiscordReactionPayload;
|
|
162
|
+
[DiscordEventTypes.WORLD_JOINED]: DiscordServerPayload;
|
|
163
|
+
[DiscordEventTypes.WORLD_CONNECTED]: DiscordServerPayload;
|
|
164
|
+
[DiscordEventTypes.ENTITY_JOINED]: DiscordUserJoinedPayload;
|
|
165
|
+
[DiscordEventTypes.ENTITY_LEFT]: DiscordUserLeftPayload;
|
|
166
|
+
[DiscordEventTypes.SLASH_COMMAND]: DiscordSlashCommandPayload;
|
|
167
|
+
[DiscordEventTypes.MODAL_SUBMIT]: DiscordSlashCommandPayload;
|
|
168
|
+
[DiscordEventTypes.VOICE_STATE_CHANGED]: DiscordVoiceStateChangedPayload;
|
|
169
|
+
[DiscordEventTypes.CHANNEL_PERMISSIONS_CHANGED]: ChannelPermissionsChangedPayload;
|
|
170
|
+
[DiscordEventTypes.ROLE_PERMISSIONS_CHANGED]: RolePermissionsChangedPayload;
|
|
171
|
+
[DiscordEventTypes.MEMBER_ROLES_CHANGED]: MemberRolesChangedPayload;
|
|
172
|
+
[DiscordEventTypes.ROLE_CREATED]: RoleLifecyclePayload;
|
|
173
|
+
[DiscordEventTypes.ROLE_DELETED]: RoleLifecyclePayload;
|
|
174
|
+
[DiscordEventTypes.LISTEN_CHANNEL_MESSAGE]: DiscordListenChannelPayload;
|
|
175
|
+
[DiscordEventTypes.NOT_IN_CHANNELS_MESSAGE]: DiscordNotInChannelsPayload;
|
|
176
|
+
}
|
|
177
|
+
export type JsonValue = string | number | boolean | null | JsonValue[] | {
|
|
178
|
+
[key: string]: JsonValue;
|
|
179
|
+
};
|
|
180
|
+
export type JsonObject = {
|
|
181
|
+
[key: string]: JsonValue;
|
|
182
|
+
};
|
|
183
|
+
export interface BuildMemoryFromMessageOptions {
|
|
184
|
+
processedContent?: string;
|
|
185
|
+
processedAttachments?: Media[];
|
|
186
|
+
extraContent?: JsonObject;
|
|
187
|
+
extraMetadata?: JsonObject;
|
|
188
|
+
}
|
|
189
|
+
export interface IDiscordService {
|
|
190
|
+
client: DiscordJsClient | null;
|
|
191
|
+
character: Character;
|
|
192
|
+
getChannelType: (channel: Channel) => Promise<ChannelType>;
|
|
193
|
+
buildMemoryFromMessage: (message: Message, options?: BuildMemoryFromMessageOptions) => Promise<Memory | null>;
|
|
194
|
+
}
|
|
195
|
+
export declare const DISCORD_SERVICE_NAME = "discord";
|
|
196
|
+
export declare const ServiceType: {
|
|
197
|
+
readonly DISCORD: "discord";
|
|
198
|
+
};
|
|
199
|
+
export interface DiscordComponentOptions {
|
|
200
|
+
type: number;
|
|
201
|
+
custom_id: string;
|
|
202
|
+
label?: string;
|
|
203
|
+
style?: number;
|
|
204
|
+
placeholder?: string;
|
|
205
|
+
min_values?: number;
|
|
206
|
+
max_values?: number;
|
|
207
|
+
options?: Array<{
|
|
208
|
+
label: string;
|
|
209
|
+
value: string;
|
|
210
|
+
description?: string;
|
|
211
|
+
}>;
|
|
212
|
+
}
|
|
213
|
+
export interface DiscordActionRow {
|
|
214
|
+
type: 1;
|
|
215
|
+
components: DiscordComponentOptions[];
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* DM access policy for Discord messages.
|
|
219
|
+
* - "open": Allow all DMs
|
|
220
|
+
* - "allowlist": Only allow DMs from users in allowFrom list
|
|
221
|
+
* - "pairing": Require pairing code approval for new DM senders
|
|
222
|
+
* - "disabled": Ignore all DMs
|
|
223
|
+
*/
|
|
224
|
+
export type DiscordDmPolicy = "open" | "allowlist" | "pairing" | "disabled";
|
|
225
|
+
export interface DiscordSettings {
|
|
226
|
+
allowedChannelIds?: string[];
|
|
227
|
+
shouldIgnoreBotMessages?: boolean;
|
|
228
|
+
shouldIgnoreDirectMessages?: boolean;
|
|
229
|
+
shouldRespondOnlyToMentions?: boolean;
|
|
230
|
+
replyToMode?: ReplyToMode;
|
|
231
|
+
/** DM access policy (default: "pairing") */
|
|
232
|
+
dmPolicy?: DiscordDmPolicy;
|
|
233
|
+
/** List of allowed Discord user IDs for allowlist policy */
|
|
234
|
+
allowFrom?: string[];
|
|
235
|
+
/** Whether the connector should synchronize the bot profile on startup. */
|
|
236
|
+
syncProfile?: boolean;
|
|
237
|
+
/** Optional explicit bot username override; falls back to character.name. */
|
|
238
|
+
profileName?: string;
|
|
239
|
+
/** Optional avatar source (https URL, data URI, or local file path). */
|
|
240
|
+
profileAvatar?: string;
|
|
241
|
+
/**
|
|
242
|
+
* When false (default), inbound messages are ingested into memory but the
|
|
243
|
+
* agent does NOT auto-generate a reply. Sends only happen when the user
|
|
244
|
+
* explicitly dispatches via LifeOps or chat command. Opt in by setting
|
|
245
|
+
* DISCORD_AUTO_REPLY=true.
|
|
246
|
+
*/
|
|
247
|
+
autoReply?: boolean;
|
|
248
|
+
}
|
|
249
|
+
export interface ChannelSpiderState {
|
|
250
|
+
channelId: string;
|
|
251
|
+
oldestMessageId?: string;
|
|
252
|
+
newestMessageId?: string;
|
|
253
|
+
oldestMessageTimestamp?: number;
|
|
254
|
+
newestMessageTimestamp?: number;
|
|
255
|
+
lastSpideredAt: number;
|
|
256
|
+
fullyBackfilled: boolean;
|
|
257
|
+
}
|
|
258
|
+
export type BatchHandler = (batch: Memory[], stats: {
|
|
259
|
+
page: number;
|
|
260
|
+
totalFetched: number;
|
|
261
|
+
totalStored: number;
|
|
262
|
+
}) => Promise<boolean | undefined> | boolean | undefined;
|
|
263
|
+
export interface ChannelHistoryOptions {
|
|
264
|
+
limit?: number;
|
|
265
|
+
force?: boolean;
|
|
266
|
+
onBatch?: BatchHandler;
|
|
267
|
+
before?: string;
|
|
268
|
+
after?: string;
|
|
269
|
+
}
|
|
270
|
+
export interface ChannelHistoryResult {
|
|
271
|
+
messages: Memory[];
|
|
272
|
+
stats: {
|
|
273
|
+
fetched: number;
|
|
274
|
+
stored: number;
|
|
275
|
+
pages: number;
|
|
276
|
+
fullyBackfilled: boolean;
|
|
277
|
+
};
|
|
278
|
+
}
|
|
279
|
+
export interface DiscordApiCommand {
|
|
280
|
+
name: string;
|
|
281
|
+
description: string;
|
|
282
|
+
options?: DiscordCommandOption[];
|
|
283
|
+
default_member_permissions?: string | null;
|
|
284
|
+
contexts?: number[];
|
|
285
|
+
}
|
|
286
|
+
export interface DiscordCommandOption {
|
|
287
|
+
name: string;
|
|
288
|
+
type: number;
|
|
289
|
+
description: string;
|
|
290
|
+
required?: boolean;
|
|
291
|
+
channel_types?: number[];
|
|
292
|
+
}
|
|
293
|
+
export interface UserSelectionState {
|
|
294
|
+
[key: string]: string | number | boolean | string[];
|
|
295
|
+
}
|
|
296
|
+
export interface DiscordMessageSendOptions {
|
|
297
|
+
content: string;
|
|
298
|
+
reply?: {
|
|
299
|
+
messageReference: string;
|
|
300
|
+
};
|
|
301
|
+
files?: Array<{
|
|
302
|
+
attachment: Buffer | string;
|
|
303
|
+
name: string;
|
|
304
|
+
}>;
|
|
305
|
+
components?: DiscordActionRow[];
|
|
306
|
+
}
|
|
307
|
+
export declare class DiscordPluginError extends Error {
|
|
308
|
+
readonly code: string;
|
|
309
|
+
constructor(message: string, code: string);
|
|
310
|
+
}
|
|
311
|
+
export declare class DiscordServiceNotInitializedError extends DiscordPluginError {
|
|
312
|
+
constructor();
|
|
313
|
+
}
|
|
314
|
+
export declare class DiscordClientNotAvailableError extends DiscordPluginError {
|
|
315
|
+
constructor();
|
|
316
|
+
}
|
|
317
|
+
export declare class DiscordConfigurationError extends DiscordPluginError {
|
|
318
|
+
constructor(missingConfig: string);
|
|
319
|
+
}
|
|
320
|
+
export declare class DiscordApiError extends DiscordPluginError {
|
|
321
|
+
readonly apiErrorCode?: number;
|
|
322
|
+
constructor(message: string, apiErrorCode?: number);
|
|
323
|
+
}
|
|
324
|
+
export type DiscordSnowflake = string & {
|
|
325
|
+
readonly __brand: "DiscordSnowflake";
|
|
326
|
+
};
|
|
327
|
+
export declare function validateSnowflake(id: string): DiscordSnowflake;
|
|
328
|
+
export declare function isValidSnowflake(id: string): id is DiscordSnowflake;
|
|
329
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":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B,iBAAiB,CAAC,EAAE,EAAE,MAAM,GAAG,gBAAgB,CAQ9D;AAED,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,EAAE,IAAI,gBAAgB,CAEnE"}
|
package/dist/typing.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { TextChannel } from "discord.js";
|
|
2
|
+
export interface TypingController {
|
|
3
|
+
start: () => void;
|
|
4
|
+
stop: () => void;
|
|
5
|
+
}
|
|
6
|
+
export declare function createTypingController(channel: TextChannel, maxDurationMs?: number): TypingController;
|
|
7
|
+
//# sourceMappingURL=typing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typing.d.ts","sourceRoot":"","sources":["../typing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C,MAAM,WAAW,gBAAgB;IAChC,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,IAAI,EAAE,MAAM,IAAI,CAAC;CACjB;AAKD,wBAAgB,sBAAsB,CACrC,OAAO,EAAE,WAAW,EACpB,aAAa,GAAE,MAAgC,GAC7C,gBAAgB,CAgDlB"}
|
package/dist/utils.d.ts
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { type IAgentRuntime, type Media, type ReplyToMode } from "@elizaos/core";
|
|
2
|
+
import { type AttachmentBuilder, ChannelType, type Message as DiscordMessage, type TextChannel, ThreadChannel } from "discord.js";
|
|
3
|
+
import type { DiscordActionRow } from "./types";
|
|
4
|
+
export interface MessagingAPI {
|
|
5
|
+
handleMessage?: (agentId: string, message: unknown, options?: {
|
|
6
|
+
onResponse?: unknown;
|
|
7
|
+
}) => Promise<unknown>;
|
|
8
|
+
sendMessage?: (agentId: string, message: unknown, options?: {
|
|
9
|
+
onResponse?: unknown;
|
|
10
|
+
}) => Promise<unknown>;
|
|
11
|
+
}
|
|
12
|
+
export interface MessageServiceAPI {
|
|
13
|
+
handleMessage: (runtime: IAgentRuntime, message: unknown, callback: unknown) => Promise<unknown>;
|
|
14
|
+
}
|
|
15
|
+
interface RuntimeWithMessagingAPI extends IAgentRuntime {
|
|
16
|
+
elizaOS: MessagingAPI;
|
|
17
|
+
}
|
|
18
|
+
export declare function hasMessagingAPI(runtime: IAgentRuntime): runtime is RuntimeWithMessagingAPI;
|
|
19
|
+
export declare function hasMessageService(runtime: IAgentRuntime): boolean;
|
|
20
|
+
export declare function getMessagingAPI(runtime: IAgentRuntime): MessagingAPI | null;
|
|
21
|
+
export declare function getMessageService(runtime: IAgentRuntime): MessageServiceAPI | null;
|
|
22
|
+
export declare const MAX_MESSAGE_LENGTH = 1900;
|
|
23
|
+
export declare function normalizeDiscordMessageText(value: unknown): string;
|
|
24
|
+
export declare function cleanUrl(url: string): string;
|
|
25
|
+
export declare function extractUrls(text: string, runtime?: IAgentRuntime): string[];
|
|
26
|
+
export declare function getAttachmentFileName(media: Media): string;
|
|
27
|
+
export declare function generateSummary(runtime: IAgentRuntime, text: string): Promise<{
|
|
28
|
+
title: string;
|
|
29
|
+
description: string;
|
|
30
|
+
}>;
|
|
31
|
+
export declare function sendMessageInChunks(channel: TextChannel, content: string, inReplyTo: string, files: Array<AttachmentBuilder | {
|
|
32
|
+
attachment: Buffer | string;
|
|
33
|
+
name: string;
|
|
34
|
+
}>, components?: DiscordActionRow[], runtime?: IAgentRuntime, replyToMode?: ReplyToMode): Promise<DiscordMessage[]>;
|
|
35
|
+
export declare function needsSmartSplit(content: string): boolean;
|
|
36
|
+
export declare function smartSplitMessage(runtime: IAgentRuntime, content: string, maxLength?: number): Promise<string[]>;
|
|
37
|
+
export declare function splitMessage(content: string, maxLength?: number): string[];
|
|
38
|
+
export interface CanSendMessageResult {
|
|
39
|
+
canSend: boolean;
|
|
40
|
+
reason: string | null;
|
|
41
|
+
missingPermissions?: bigint[];
|
|
42
|
+
}
|
|
43
|
+
type SendableChannel = TextChannel | ThreadChannel | {
|
|
44
|
+
type: ChannelType;
|
|
45
|
+
};
|
|
46
|
+
export declare function canSendMessage(channel: SendableChannel | null | undefined): CanSendMessageResult;
|
|
47
|
+
export {};
|
|
48
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,aAAa,EAElB,KAAK,KAAK,EAGV,KAAK,WAAW,EAEhB,MAAM,eAAe,CAAC;AACvB,OAAO,EAEN,KAAK,iBAAiB,EAEtB,WAAW,EACX,KAAK,OAAO,IAAI,cAAc,EAK9B,KAAK,WAAW,EAChB,aAAa,EACb,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EACX,gBAAgB,EAGhB,MAAM,SAAS,CAAC;AAEjB,MAAM,WAAW,YAAY;IAC5B,aAAa,CAAC,EAAE,CACf,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,OAAO,EAChB,OAAO,CAAC,EAAE;QAAE,UAAU,CAAC,EAAE,OAAO,CAAA;KAAE,KAC9B,OAAO,CAAC,OAAO,CAAC,CAAC;IACtB,WAAW,CAAC,EAAE,CACb,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,OAAO,EAChB,OAAO,CAAC,EAAE;QAAE,UAAU,CAAC,EAAE,OAAO,CAAA;KAAE,KAC9B,OAAO,CAAC,OAAO,CAAC,CAAC;CACtB;AAED,MAAM,WAAW,iBAAiB;IACjC,aAAa,EAAE,CACd,OAAO,EAAE,aAAa,EACtB,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,OAAO,KACb,OAAO,CAAC,OAAO,CAAC,CAAC;CACtB;AAED,UAAU,uBAAwB,SAAQ,aAAa;IACtD,OAAO,EAAE,YAAY,CAAC;CACtB;AAED,wBAAgB,eAAe,CAC9B,OAAO,EAAE,aAAa,GACpB,OAAO,IAAI,uBAAuB,CAcpC;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,aAAa,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CAiDnB;AAED,wBAAgB,YAAY,CAC3B,OAAO,EAAE,MAAM,EACf,SAAS,GAAE,MAA2B,GACpC,MAAM,EAAE,CA+CV;AAED,MAAM,WAAW,oBAAoB;IACpC,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC9B;AAED,KAAK,eAAe,GAAG,WAAW,GAAG,aAAa,GAAG;IAAE,IAAI,EAAE,WAAW,CAAA;CAAE,CAAC;AAE3E,wBAAgB,cAAc,CAC7B,OAAO,EAAE,eAAe,GAAG,IAAI,GAAG,SAAS,GACzC,oBAAoB,CAgEtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vitest.config.d.ts","sourceRoot":"","sources":["../vitest.config.ts"],"names":[],"mappings":";AAEA,wBAMG"}
|
package/dist/voice.d.ts
ADDED
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
import { EventEmitter } from "node:events";
|
|
2
|
+
import { Readable } from "node:stream";
|
|
3
|
+
import { type AudioPlayer, type VoiceConnection } from "@discordjs/voice";
|
|
4
|
+
import { ChannelType, type UUID } from "@elizaos/core";
|
|
5
|
+
import { type BaseGuildVoiceChannel, type Channel, type Guild, type VoiceState } from "discord.js";
|
|
6
|
+
import type { ICompatRuntime } from "./compat";
|
|
7
|
+
import type { DiscordService } from "./service";
|
|
8
|
+
/**
|
|
9
|
+
* Class representing an AudioMonitor that listens for audio data from a Readable stream.
|
|
10
|
+
*/
|
|
11
|
+
export declare class AudioMonitor {
|
|
12
|
+
private readable;
|
|
13
|
+
private buffers;
|
|
14
|
+
private maxSize;
|
|
15
|
+
private lastFlagged;
|
|
16
|
+
private ended;
|
|
17
|
+
/**
|
|
18
|
+
* Constructs an AudioMonitor instance.
|
|
19
|
+
* @param {Readable} readable - The readable stream to monitor for audio data.
|
|
20
|
+
* @param {number} maxSize - The maximum size of the audio buffer.
|
|
21
|
+
* @param {function} onStart - The callback function to be called when audio starts.
|
|
22
|
+
* @param {function} callback - The callback function to process audio data.
|
|
23
|
+
*/
|
|
24
|
+
constructor(readable: Readable, maxSize: number, onStart: () => void, callback: (buffer: Buffer) => void);
|
|
25
|
+
/**
|
|
26
|
+
* Stops listening to "data", "end", "speakingStopped", and "speakingStarted" events on the readable stream.
|
|
27
|
+
*/
|
|
28
|
+
stop(): void;
|
|
29
|
+
/**
|
|
30
|
+
* Check if the item is flagged.
|
|
31
|
+
* @returns {boolean} True if the item was flagged, false otherwise.
|
|
32
|
+
*/
|
|
33
|
+
isFlagged(): boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Returns a Buffer containing all buffers starting from the last flagged index.
|
|
36
|
+
* If the last flagged index is less than 0, returns null.
|
|
37
|
+
*
|
|
38
|
+
* @returns {Buffer | null} The concatenated Buffer or null
|
|
39
|
+
*/
|
|
40
|
+
getBufferFromFlag(): Buffer<ArrayBuffer>;
|
|
41
|
+
/**
|
|
42
|
+
* Concatenates all buffers in the array and returns a single buffer.
|
|
43
|
+
*
|
|
44
|
+
* @returns {Buffer} The concatenated buffer from the start.
|
|
45
|
+
*/
|
|
46
|
+
getBufferFromStart(): Buffer<ArrayBuffer>;
|
|
47
|
+
/**
|
|
48
|
+
* Resets the buffers array and sets lastFlagged to -1.
|
|
49
|
+
*/
|
|
50
|
+
reset(): void;
|
|
51
|
+
/**
|
|
52
|
+
* Check if the object has ended.
|
|
53
|
+
* @returns {boolean} Returns true if the object has ended; false otherwise.
|
|
54
|
+
*/
|
|
55
|
+
isEnded(): boolean;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Class representing a VoiceManager that extends EventEmitter.
|
|
59
|
+
* @extends EventEmitter
|
|
60
|
+
*/
|
|
61
|
+
export declare class VoiceManager extends EventEmitter {
|
|
62
|
+
private processingVoice;
|
|
63
|
+
private transcriptionTimeout;
|
|
64
|
+
private userStates;
|
|
65
|
+
private activeAudioPlayer;
|
|
66
|
+
private client;
|
|
67
|
+
private runtime;
|
|
68
|
+
private streams;
|
|
69
|
+
private connections;
|
|
70
|
+
private activeMonitors;
|
|
71
|
+
private ready;
|
|
72
|
+
/**
|
|
73
|
+
* Constructor for initializing a new instance of the class.
|
|
74
|
+
*
|
|
75
|
+
* @param {DiscordService} service - The Discord service to use.
|
|
76
|
+
* @param {ICompatRuntime} runtime - The runtime for the agent (with cross-core compat).
|
|
77
|
+
*/
|
|
78
|
+
constructor(service: DiscordService, runtime: ICompatRuntime);
|
|
79
|
+
/**
|
|
80
|
+
* Asynchronously retrieves the type of the channel.
|
|
81
|
+
* @param {Channel} channel - The channel to get the type for.
|
|
82
|
+
* @returns {Promise<ChannelType>} The type of the channel.
|
|
83
|
+
*/
|
|
84
|
+
getChannelType(channel: Channel): Promise<ChannelType>;
|
|
85
|
+
/**
|
|
86
|
+
* Set the ready status of the VoiceManager.
|
|
87
|
+
* @param {boolean} status - The status to set.
|
|
88
|
+
*/
|
|
89
|
+
private setReady;
|
|
90
|
+
/**
|
|
91
|
+
* Tears down active voice state so the Discord connector can unload cleanly.
|
|
92
|
+
*/
|
|
93
|
+
stop(): void;
|
|
94
|
+
/**
|
|
95
|
+
* Check if the object is ready.
|
|
96
|
+
*
|
|
97
|
+
* @returns {boolean} True if the object is ready, false otherwise.
|
|
98
|
+
*/
|
|
99
|
+
isReady(): boolean;
|
|
100
|
+
/**
|
|
101
|
+
* Handle voice state update event.
|
|
102
|
+
* @param {VoiceState} oldState - The old voice state of the member.
|
|
103
|
+
* @param {VoiceState} newState - The new voice state of the member.
|
|
104
|
+
* @returns {void}
|
|
105
|
+
*/
|
|
106
|
+
handleVoiceStateUpdate(oldState: VoiceState, newState: VoiceState): Promise<void>;
|
|
107
|
+
/**
|
|
108
|
+
* Joins a voice channel and sets up the necessary connection and event listeners.
|
|
109
|
+
* @param {BaseGuildVoiceChannel} channel - The voice channel to join
|
|
110
|
+
*/
|
|
111
|
+
joinChannel(channel: BaseGuildVoiceChannel): Promise<void>;
|
|
112
|
+
/**
|
|
113
|
+
* Retrieves the voice connection for a given guild ID.
|
|
114
|
+
* @param {string} guildId - The ID of the guild to get the voice connection for.
|
|
115
|
+
* @returns {VoiceConnection | undefined} The voice connection for the specified guild ID, or undefined if not found.
|
|
116
|
+
*/
|
|
117
|
+
getVoiceConnection(guildId: string): VoiceConnection;
|
|
118
|
+
/**
|
|
119
|
+
* Monitor a member's audio stream for volume activity and speaking thresholds.
|
|
120
|
+
*
|
|
121
|
+
* @param {GuildMember} member - The member whose audio stream is being monitored.
|
|
122
|
+
* @param {BaseGuildVoiceChannel} channel - The voice channel in which the member is connected.
|
|
123
|
+
*/
|
|
124
|
+
private monitorMember;
|
|
125
|
+
/**
|
|
126
|
+
* Leaves the specified voice channel and stops monitoring all members in that channel.
|
|
127
|
+
* If there is an active connection in the channel, it will be destroyed.
|
|
128
|
+
*
|
|
129
|
+
* @param {BaseGuildVoiceChannel} channel - The voice channel to leave.
|
|
130
|
+
*/
|
|
131
|
+
leaveChannel(channel: BaseGuildVoiceChannel): void;
|
|
132
|
+
/**
|
|
133
|
+
* Stop monitoring a specific member by their member ID.
|
|
134
|
+
* @param {string} memberId - The ID of the member to stop monitoring.
|
|
135
|
+
*/
|
|
136
|
+
stopMonitoringMember(memberId: string): void;
|
|
137
|
+
/**
|
|
138
|
+
* Asynchronously debounces the process transcription function to prevent rapid execution.
|
|
139
|
+
*
|
|
140
|
+
* @param {UUID} entityId - The ID of the entity related to the transcription.
|
|
141
|
+
* @param {string} name - The name of the entity for transcription.
|
|
142
|
+
* @param {string} userName - The username of the user initiating the transcription.
|
|
143
|
+
* @param {BaseGuildVoiceChannel} channel - The voice channel where the transcription is happening.
|
|
144
|
+
*/
|
|
145
|
+
debouncedProcessTranscription(entityId: UUID, name: string, userName: string, channel: BaseGuildVoiceChannel): Promise<void>;
|
|
146
|
+
/**
|
|
147
|
+
* Handle user audio stream for monitoring purposes.
|
|
148
|
+
*
|
|
149
|
+
* @param {UUID} userId - The unique identifier of the user.
|
|
150
|
+
* @param {string} name - The name of the user.
|
|
151
|
+
* @param {string} userName - The username of the user.
|
|
152
|
+
* @param {BaseGuildVoiceChannel} channel - The voice channel the user is in.
|
|
153
|
+
* @param {Readable} audioStream - The audio stream to monitor.
|
|
154
|
+
*/
|
|
155
|
+
handleUserStream(entityId: UUID, name: string, userName: string, channel: BaseGuildVoiceChannel, audioStream: Readable): Promise<void>;
|
|
156
|
+
/**
|
|
157
|
+
* Process the transcription of audio data for a user.
|
|
158
|
+
*
|
|
159
|
+
* @param {UUID} entityId - The unique ID of the user entity.
|
|
160
|
+
* @param {string} channelId - The ID of the channel where the transcription is taking place.
|
|
161
|
+
* @param {BaseGuildVoiceChannel} channel - The voice channel where the user is speaking.
|
|
162
|
+
* @param {string} name - The name of the user.
|
|
163
|
+
* @param {string} userName - The username of the user.
|
|
164
|
+
* @returns {Promise<void>}
|
|
165
|
+
*/
|
|
166
|
+
private processTranscription;
|
|
167
|
+
/**
|
|
168
|
+
* Handles a voice message received in a Discord channel.
|
|
169
|
+
*
|
|
170
|
+
* @param {string} message - The message content.
|
|
171
|
+
* @param {UUID} entityId - The entity ID associated with the message.
|
|
172
|
+
* @param {string} channelId - The ID of the Discord channel where the message was received.
|
|
173
|
+
* @param {BaseGuildVoiceChannel} channel - The Discord channel where the message was received.
|
|
174
|
+
* @param {string} name - The name associated with the message.
|
|
175
|
+
* @param {string} userName - The user name associated with the message.
|
|
176
|
+
* @returns {Promise<{text: string, actions: string[]}>} Object containing the resulting text and actions.
|
|
177
|
+
*/
|
|
178
|
+
private handleMessage;
|
|
179
|
+
/**
|
|
180
|
+
* Asynchronously converts an Opus audio Buffer to a WAV audio Buffer.
|
|
181
|
+
*
|
|
182
|
+
* @param {Buffer} pcmBuffer - The Opus audio Buffer to convert to WAV.
|
|
183
|
+
* @returns {Promise<Buffer>} A Promise that resolves with the converted WAV audio Buffer.
|
|
184
|
+
*/
|
|
185
|
+
private convertOpusToWav;
|
|
186
|
+
/**
|
|
187
|
+
* Scans the given Discord guild to select a suitable voice channel to join.
|
|
188
|
+
*
|
|
189
|
+
* @param {Guild} guild The Discord guild to scan for voice channels.
|
|
190
|
+
*/
|
|
191
|
+
scanGuild(guild: Guild): Promise<void>;
|
|
192
|
+
/**
|
|
193
|
+
* Play an audio stream for a given entity ID.
|
|
194
|
+
*
|
|
195
|
+
* @param {UUID} entityId - The ID of the entity to play the audio for.
|
|
196
|
+
* @param {Readable} audioStream - The audio stream to play.
|
|
197
|
+
* @returns {void}
|
|
198
|
+
*/
|
|
199
|
+
playAudioStream(entityId: UUID, audioStream: Readable): Promise<void>;
|
|
200
|
+
/**
|
|
201
|
+
* Cleans up the provided audio player by stopping it, removing all listeners,
|
|
202
|
+
* and resetting the active audio player if it matches the provided player.
|
|
203
|
+
*
|
|
204
|
+
* @param {AudioPlayer} audioPlayer - The audio player to be cleaned up.
|
|
205
|
+
*/
|
|
206
|
+
cleanupAudioPlayer(audioPlayer: AudioPlayer | null): void;
|
|
207
|
+
/**
|
|
208
|
+
* Asynchronously handles the join channel command in an interaction.
|
|
209
|
+
*
|
|
210
|
+
* @param interaction - The interaction object representing the user's input.
|
|
211
|
+
* @returns A promise that resolves once the join channel command is handled.
|
|
212
|
+
*/
|
|
213
|
+
handleJoinChannelCommand(interaction: {
|
|
214
|
+
deferReply: () => Promise<void>;
|
|
215
|
+
options: {
|
|
216
|
+
get: (name: string) => {
|
|
217
|
+
value: string;
|
|
218
|
+
} | null;
|
|
219
|
+
};
|
|
220
|
+
guild: Guild | null;
|
|
221
|
+
editReply: (message: string) => Promise<void>;
|
|
222
|
+
}): Promise<void>;
|
|
223
|
+
/**
|
|
224
|
+
* Handles the leave channel command by destroying the voice connection if it exists.
|
|
225
|
+
*
|
|
226
|
+
* @param interaction - The interaction object representing the command invocation.
|
|
227
|
+
* @returns A promise that resolves once the leave channel command is handled.
|
|
228
|
+
*/
|
|
229
|
+
handleLeaveChannelCommand(interaction: {
|
|
230
|
+
guildId: string | null;
|
|
231
|
+
reply: (message: string) => Promise<void>;
|
|
232
|
+
}): Promise<void>;
|
|
233
|
+
}
|
|
234
|
+
//# sourceMappingURL=voice.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"voice.d.ts","sourceRoot":"","sources":["../voice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAY,QAAQ,EAAkB,MAAM,aAAa,CAAC;AACjE,OAAO,EACN,KAAK,WAAW,EAShB,KAAK,eAAe,EAEpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACN,WAAW,EASX,KAAK,IAAI,EACT,MAAM,eAAe,CAAC;AACvB,OAAO,EACN,KAAK,qBAAqB,EAC1B,KAAK,OAAO,EAGZ,KAAK,KAAK,EAGV,KAAK,UAAU,EACf,MAAM,YAAY,CAAC;AAKpB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAsFhD;;GAEG;AACH,qBAAa,YAAY;IACxB,OAAO,CAAC,QAAQ,CAAW;IAC3B,OAAO,CAAC,OAAO,CAAgB;IAC/B,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,WAAW,CAAM;IACzB,OAAO,CAAC,KAAK,CAAS;IAEtB;;;;;;OAMG;gBAEF,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,IAAI,EACnB,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI;IAkDnC;;OAEG;IACH,IAAI;IAOJ;;;OAGG;IACH,SAAS;IAIT;;;;;OAKG;IACH,iBAAiB;IAQjB;;;;OAIG;IACH,kBAAkB;IAKlB;;OAEG;IACH,KAAK;IAKL;;;OAGG;IACH,OAAO;CAGP;AAED;;;GAGG;AACH,qBAAa,YAAa,SAAQ,YAAY;IAC7C,OAAO,CAAC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