Fohlen / discord-bot

Simple bot that prints game results on Discord based on a SauerTracker query

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Discord Bot

Simple bot that prints game results on Discord based on a SauerTracker query.

Installation

You must have Git and Node.js installed. Run the following commands:

git clone https://github.com/sauerduels/discord-bot.git
cd discord-bot
npm install

Configuration

Copy config.default.json to config.json and open it in a text editor. Here you can change the following configuration options:

  • discordToken: The Discord bot token. One can obtained by following this guide.
  • discordChannelID: The ID of the channel where the bot shall print its messages. It can be obtained by right clicking on a Discord channel and selecting Copy ID.
  • sauertrackerApiUrl: The SauertTracker query URL. For example, http://sauertracker.net/api/games/find?gametype=duel&serverdesc=something will find duels played on a server whose description contains something.

Running

Run the following command (use screen or tmux in order to create a persistent session):

node index.js

Commands

.deleteafter [MSG_ID]: Deletes all messages in current channel after (but not including) MSG_ID. Requires Manage Messages permission on the server.

About

Simple bot that prints game results on Discord based on a SauerTracker query

License:GNU General Public License v3.0


Languages

Language:JavaScript 92.4%Language:Dockerfile 7.6%