A simple Discord bot for displaying game server status.
- Create at least one bot in the Discord developer portal.
- Clone this repository.
- Copy
config-example.json
to~/k33nbot.json
- Customize
k33nbot.json
npm install
node index.js
K33NBot has a flexible configuration. An instance of K33NBot can consist of one or many bots. Each bot can have one or many actions. Actions have a command associated with them, as well as a plugin, which defines what the action does.
Use the included config-example.json
as an example of proper syntax to base your configuration from.
- debug -
true
orfalse
. Controls the amount of console output.
- type - Specifies the behavior of the bot. Current options are
discordClient
anddiscordWebhook
. - options - An array of options that are specific to the bot type defined.
- actions - An array of actions for the bot, detailed in the next section.
Each bot type may have options that can be used to customize its behavior. Some options may be required, while others are optional.
- actionPrefix - Messages beginning with this prefix, followed by an action command, will be executed by this bot.
- defaultPresence - If present, always adds this string to the bot's presence text.
- token - The Discord API token to use for the bot.
- webhookUrl - The webhook URL.
- plugin - Specifies the behavior of the action. Current options are
battlemetrics
,fivem
,mcserverstatus
,message
, andtimer
. - command - Messages beginning with the bot's
actionPrefix
, followed by this command, will execute this action. - options - An array of options that are specific to the plugin defined.
Each action plugin may have options that can be used to customize its behavior. Some options may be required, while others are optional.
Allows manipulation of configuration JSON.
- allowedRole - Users in this role can use this plugin.
The battlemetrics
plugin has only been tested with Project Zomboid and Rust servers.
- name - Name to show for the server in the bot's presence.
- thumbnail - URL of thumbnail to show in the reply embed.
- image - URL of image banner to show in the reply embed.
- serverId - Battlemetrics ID for the server.
- name - Name to show for the server in the bot's presence.
- thumbnail - URL of thumbnail to show in the reply embed.
- image - URL of image banner to show in the reply embed.
- server - IP:port of the FiveM server.
Send a message to a specific channel whenever a new person joins the server.
- channel - Name of channel to send the message to.
- name - Name to show for the server in the bot's presence.
- thumbnail - URL of thumbnail to show in the reply embed.
- image - URL of image banner to show in the reply embed.
- server - IP:port of the Minecraft server.
Reply to a command with a message.
- message - Message to reply with.
- presence - Text to append to the bot's presence.
- useEmbed - If true, sends the message using embed formatting.
Send a message to a specific channel at the specified interval.
- channel - Name of channel to send the message to.
- interval - Number of seconds between sending the message.
- message - The message to send.
Sorry! This bot comes as-is, without support.
© 2019 K33N Gaming Community