Hoshimi
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

quick-start-manager.ts
import {  } from 'hoshimi';

const  = async (: string, : unknown): <void> => {};

const  = new ({
  : [{ : 'localhost', : 2333, : 'youshallnotpass' }],
  (, ) {
    return (, );
  },
});

2) Init on ready

quick-start-ready.ts
import type {  } from 'hoshimi';

declare const : ;

declare const : {
  : string;
  : string;
  : string | null;
};

.();

3) Forward raw voice packets

quick-start-raw.ts
import type {
  ,
  VoicePacket,
  VoiceServer,
  VoiceState,
  ChannelDeletePacket,
} from 'hoshimi';

type  = VoicePacket | VoiceServer | VoiceState | ChannelDeletePacket;

declare const : ;
declare const : ;

await .();

4) Search, queue and play

quick-start-play.ts
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

On this page