Skip to main content
Version: v2.10.1

Eris Wrapper

Table of Contentsโ€‹

Class Definitionโ€‹

export class ErisManager extends Manager {}

Constructorโ€‹

new ErisManager(client: Client, options?: ManagerOptions)
Parameter Type Description Optional
clientClientThe Eris client instance.
optionsManagerOptionsThe manager options.
note

The constructor automatically hooks into the Eris client to:

  • Set clientId from client.user.id once the ready event fires.
  • Forward raw gateway packets to updateVoiceState() via the rawWS event.
  • Throw a MagmaStreamError if guildVoiceStates is not present in client.options.intents (supports both numeric bitfield and string array formats).

Methodsโ€‹

resolveGuild()โ€‹

override resolveGuild(guildId: string): Guild | null

Resolves a guild from the Eris guild cache by ID.

Parametersโ€‹

Parameter Type Description Optional
guildIdstringThe guild ID to resolve.

Returnsโ€‹

Type Description
Guild | nullThe cached guild, or null if not found.

resolveUser()โ€‹

override async resolveUser(user: AnyUser | string): Promise<User | AnyUser>

Resolves a user from the Eris user cache by ID. Falls back to a minimal { id, username } object if not cached.

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 guild's shard using shard.sendWS.

Parametersโ€‹

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