Discordeno Wrapper
Table of Contentsโ
Class Definitionโ
export class DiscordenoManager extends Manager {}
Constructorโ
new DiscordenoManager(client: Bot, options?: ManagerOptions)
Parameter Type Description Optional clientBot The Discordeno Botinstance.optionsManagerOptionsThe manager options.
note
The constructor automatically hooks into the Discordeno bot to:
- Set
clientIdfromclient.applicationIdonce theREADYhandler fires (chaining the existing handler if present). - Forward
VOICE_STATE_UPDATEandVOICE_SERVER_UPDATEgateway events toupdateVoiceState()(chaining existing handlers if present). - Throw a
MagmaStreamErrorif theGuildVoiceStatesintent is not set onclient.gateway.intents.
Methodsโ
resolveGuild()โ
override resolveGuild(guildId: string): AnyGuildResolves a guild using the user-provided
getGuildcache callback configured inManagerOptions.Parametersโ
Parameter Type Description Optional guildIdstring The guild ID to resolve. Returnsโ
Type Description AnyGuildThe resolved guild from the cache callback.
resolveUser()โ
override async resolveUser(user: AnyUser | string): Promise<User | AnyUser>Resolves a user using the user-provided
getUsercache callback configured inManagerOptions. Falls back to a minimal{ id, username }object if the cache callback returns nothing.Parametersโ
Parameter Type Description Optional userAnyUser| stringThe user object or user ID to resolve. Returnsโ
Type Description Promise<User | AnyUser>The resolved user, or a minimal fallback object.
send()โ
note
This method is protected. It is called internally and is not intended for direct use.
protected override send(packet: GatewayVoiceStateUpdate): voidSends a voice state update to Discord via the Discordeno gateway, targeting the correct shard using
calculateShardId.Parametersโ
Parameter Type Description Optional packetGatewayVoiceStateUpdate The voice state update packet to send.