Git Product home page Git Product logo

discord_channel_api's Introduction

DISCORD_CHANNNEL_API

ENGLISH IS DOWN IN PAGE

websocket入力を使い簡単にdiscordのチャンネルにメッセージを送信することができるAPIを提供するサーバーです。 付属のライブラリには簡易的にdisocordにbotのトークンでログインする機能があります。

使い方

conf.jsonにまずtokenを貼り、portを決めた後追加したい項目をあらたにオブジェクトとして作成し、cid(channel id)を指定してください。 オブジェクトのキーの名前がそのままapiの呼び出し名になります。 conf.json内のテンプレートをコピーして使うことを推奨します。

APIの使い方

以下の形式でwebsocketでsendすることにより利用可能です。
    ws.send(JSON.stringify({ type: "zisin", message: "test" }));

typeで指定したものがそのままconf内の指定名に直結します。 詳しくはcli.jsを参考にしてください。

ENGLISH

DISCORD_CHANNEL_API

english is down in page

This server provides an API that allows you to easily send messages to a discord channel using websocket input. The included library provides a simple way to login to discord with bot token.

Usage

First, paste the token into conf.json, then create a new object with the items you want to add, and specify the cid (channel id). The key name of the object will be used as the API call name.

How to use API

You can use it by sending with websocket in the following format.
    ws.send(JSON.stringify({ type: "zisin", message: "test" }));

The type specified directly corresponds to the name specified in the conf. Please refer to cli.js for details.

discord_channel_api's People

Contributors

suke0930 avatar

Watchers

 avatar

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.