Giter VIP home page Giter VIP logo

yay.js's Introduction


yay.js


Discord server license npm version npm downloads

About

同世代と趣味の通話コミュニティ - Yay!(イェイ)の API を簡単に扱える Node.js モジュールです。

  • オブジェクト指向
  • 非同期処理に対応
  • クッキーに対応
  • API を 100% カバー

Python 版はこちら

Installation

Node.js 16.17.0 以上のバージョンが必要です。

npm install yay.js

Example usage

yay.js をインストール:

npm install yay.js

通常の API にアクセスする場合:

import { Client } from 'yay.js';

const main = async () => {
  const client = new Client();

  await client.login({
    email: 'yourEmail',
    password: 'yourPassword',
  });

  await client.createPost({
    text: 'Hello with yay.js!',
    sharedUrl: 'https://github.com/ekkx/yay.js',
  });
};

main();

WebSocket を使用する場合:

import { Client, GatewayIntents } from 'yay.js';
const client = new Client({ intents: [GatewayIntents.ChatMessage] });

client.on('ready', () => {
  console.log('The bot is ready!');
});

client.on('messageCreate', async (message) => {
  if (message.text === 'ping') {
    await client.sendMessage({
      text: 'pong',
      roomId: message.roomId,
    });
  }
});

client.login({
  email: 'yourEmail',
  password: 'yourPassword',
});

Links

Contributing

現在開発中です。
以下のアイコンをクリックして参加!

Help

もしドキュメントを読んでもわからないことがあったり、なかなか解決しない問題があった場合は、遠慮なく yay.js の公式 Discord サーバーに参加してください!

yay.js's People

Contributors

ekkx avatar

Stargazers

 avatar mashiji24 avatar 10-ui avatar  avatar  avatar tabo avatar 神瀬 来未 avatar  avatar  avatar ジュアン avatar TechFish4 avatar

Watchers

 avatar

yay.js's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.