Eris Wrapper
Table of Contentsโ
Class Definitionโ
export class ErisManager extends Manager {}
Constructorโ
new ErisManager(client: Client, options?: ManagerOptions)
Parameter Type Description Optional clientClient The Eris client instance. optionsManagerOptionsThe manager options.
note
The constructor automatically hooks into the Eris client to:
- Set
clientIdfromclient.user.idonce thereadyevent fires. - Forward raw gateway packets to
updateVoiceState()via therawWSevent. - Throw a
MagmaStreamErrorifguildVoiceStatesis not present inclient.options.intents(supports both numeric bitfield and string array formats).
Methodsโ
resolveGuild()โ
override resolveGuild(guildId: string): Guild | nullResolves a guild from the Eris guild cache by ID.
Parametersโ
Parameter Type Description Optional guildIdstring The guild ID to resolve. Returnsโ
Type Description Guild | null The cached guild, or nullif 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): voidSends a voice state update to Discord via the guild's shard using
shard.sendWS.Parametersโ
Parameter Type Description Optional packetGatewayVoiceStateUpdate The voice state update packet to send.