questionableprofile / esnotifier

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

esnotifier

Using the Notifier

Configuration

Rename sampleconfig.txt to config.txt

Using with Telegram

  • Create a bot using the @BotFather
  • Get the bot token
  • Get your personal chat_id (with @myidbot for example)

Edit the following part of the config.txt

"telegram": {
  "use": true,
  "token": "YOUR TOKEN",
  "chatId": 123
}
  • Bot's token - "token" field
  • Chat_id - "chatId" field
  • To enable Telegram module leave field "use" - true

Client

Client is integrated into eso, use /notf command to enable it

Running

$ npm install

and then

$ npm start

or click eso.bat on Windows

Development

App server is listening on http://localhost:9673 by default

To create an event, make POST request to /event URL with a JSON data payload

Example JSON scheme:

{
    "code": "EVENT_CODE",
    "data": {
        "gameData": {
          "node": "ext_square"
        },
        "eventData": {
          "reason": "EVENT_CODE",
          "sender": 1,
          "message": "Hello, World!"
        },
        "actor": {
          "id": 1,
          "name": "UserName"
        }
    }
}

About


Languages

Language:JavaScript 99.4%Language:Shell 0.4%Language:Batchfile 0.3%