Skip to main content
Version: v2.10.5

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.