Getting Started
Quick Start
Build your first working play command flow in minutes.
This page gives you the shortest complete path from setup to playback. You can copy this flow directly and evolve it into your command architecture.
Type reference: Core API (TypeDoc)
1) Create the manager
import { } from 'hoshimi';
const = async (: string, : unknown): <void> => {};
const = new ({
: [{ : 'localhost', : 2333, : 'youshallnotpass' }],
(, ) {
return (, );
},
});2) Init on ready
import type { } from 'hoshimi';
declare const : ;
declare const : {
: string;
: string;
: string | null;
};
.();3) Forward raw voice packets
import type {
,
VoicePacket,
VoiceServer,
VoiceState,
ChannelDeletePacket,
} from 'hoshimi';
type = VoicePacket | VoiceServer | VoiceState | ChannelDeletePacket;
declare const : ;
declare const : ;
await .();4) Search, queue and play
import { } from 'hoshimi';
import type { } from 'hoshimi';
declare const : ;
declare const : string;
declare const : string;
declare const : string;
const = .({
,
,
,
: 100,
: true,
});
const = await .({
: 'Nujabes - Feather',
: { : '123', : 'demo' },
});
if (. === . || . === .) {
await ..(.[0]);
if (!.) await .();
if (!.()) await .();
}Next
- Continue with Bot Integration
- Deep dive into Core API