@sopia-bot/core
TypeScript icon, indicating that this package has built-in type declarations

2.3.3 • Public • Published

@sopia-bot/core

Spoon radio api wrapper https://www.spooncast.net/.

Install

npm install @sopia-bot/core

or

yarn add @sopia-bot/core

Usage

import {
  SpoonClient,
  Country,
  SnsType,
  LiveEvent,
} from '@sopia-bot/core';

(async () => {
  const spoon = new SpoonClinet('DeviceUUID');
  spoon.country = Country.KOREA;
    
  await spoon.init();
  await spoon.login('Your ID', 'Your Password', SnsType.PHONE);
    
  const socket = await spoon.api.lives.join(#Live);
    
  socket.on(LiveEvent.LIVE_JOIN, (e) => {
    // do something.
    ...
    socket.message('Message');
  });
    
  socket.on(LiveEvent.LIVE_MESSAGE, (e) => {
    // sender = e.author
  });
})();

Package Sidebar

Install

npm i @sopia-bot/core

Weekly Downloads

1

Version

2.3.3

License

MIT

Unpacked Size

207 kB

Total Files

174

Last publish

Collaborators

  • tree-some