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 | WorkerClient The Seyfert ClientorWorkerClientinstance.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"> | nullResolves a guild from the Seyfert guild cache by ID.
Parametersโ
Parameter Type Description Optional guildIdstring The guild ID to resolve. Returnsโ
Type Description Guild<"cached"> | null The cached guild, or nullif 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): voidSends a voice state update to Discord. Uses
client.gateway.sendfor aClientinstance, orclient.shards.get(...).sendfor aWorkerClient.Parametersโ
Parameter Type Description Optional packetGatewayVoiceStateUpdate The voice state update packet to send.