Skip to main content
Version: v2.10.1

Discordeno Wrapper

Table of Contentsโ€‹

Class Definitionโ€‹

export class DiscordenoManager extends Manager {}

Constructorโ€‹

new DiscordenoManager(client: Bot, options?: ManagerOptions)
Parameter Type Description Optional
clientBotThe Discordeno Bot instance.
optionsManagerOptionsThe manager options.
note

The constructor automatically hooks into the Discordeno bot to:

  • Set clientId from client.applicationId once the READY handler fires (chaining the existing handler if present).
  • Forward VOICE_STATE_UPDATE and VOICE_SERVER_UPDATE gateway events to updateVoiceState() (chaining existing handlers if present).
  • Throw a MagmaStreamError if the GuildVoiceStates intent is not set on client.gateway.intents.

Methodsโ€‹

resolveGuild()โ€‹

override resolveGuild(guildId: string): AnyGuild

Resolves a guild using the user-provided getGuild cache callback configured in ManagerOptions.

Parametersโ€‹

Parameter Type Description Optional
guildIdstringThe 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 getUser cache callback configured in ManagerOptions. 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): void

Sends a voice state update to Discord via the Discordeno gateway, targeting the correct shard using calculateShardId.

Parametersโ€‹

Parameter Type Description Optional
packetGatewayVoiceStateUpdateThe voice state update packet to send.