Skip to main content
Version: v2.10.2 (current)

Seyfert Wrapper

Table of Contentsโ€‹

Class Definitionโ€‹

export class SeyfertManager extends Manager {}

Constructorโ€‹

new SeyfertManager(client: Client | WorkerClient, options?: ManagerOptions)
Parameter Type Description Optional
clientClient | WorkerClientThe Seyfert Client or WorkerClient instance.
optionsManagerOptionsThe manager options.
warning

Unlike the other wrappers, the Seyfert wrapper does not automatically hook into ready or raw gateway events. You must wire up updateVoiceState and init manually:

const client = new Client();
const manager = new SeyfertManager(client, options);

client.events.values.RAW = {
data: { name: "raw" },
run: async (data) => {
await manager.updateVoiceState(data);
}
};

client.events.values.READY = {
data: { name: "ready" },
run: async (user, client) => {
await manager.init({ clientId: client.botId });
}
};

The constructor does asynchronously verify that the GuildVoiceStates intent is set via client.getRC(), throwing a MagmaStreamError if it is missing.

Methodsโ€‹

resolveGuild()โ€‹

override resolveGuild(guildId: string): Guild<"cached"> | null

Resolves a guild from the Seyfert guild cache by ID.

Parametersโ€‹

Parameter Type Description Optional
guildIdstringThe guild ID to resolve.

Returnsโ€‹

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

resolveUser()โ€‹

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

Resolves a user from the Seyfert user cache by ID, fetching from the API if not cached. Falls back to a minimal { id, username } object if the fetch fails.

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. Uses client.gateway.send for a Client instance, or client.shards.get(...).send for a WorkerClient.

Parametersโ€‹

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