MT Status Bot
This page explains how to use and setup the MT Status Bot.
What Can The Bot Do
In brief the bot can do the following;
- Get MotorTown server status.
- Get player count for servers.
- Get total players playing MotorTown.
- Sync in-game to discord. (chats, joins & leaves) - ChatLogger
Quick Setup
Step 1. Invite the bot to your server.
Step 2. - use the /mt servers add server:server-name
command and select a server from the list.
Step 3. - Set the channel which the status embed will be sent and updated
To set the channel: /mt channel channel:#channel
Configuring The Bot
These commands by default will only be accessible by users with the administrator permission.
Title
Title - The title of the embed.
To set the title: /mt embed titletitle:title-here
Colour
Colour - The color of the embed.
To set the color: /mt embed colourcolour:Hex-colour
Set Channel
Channel - Set the channel where you want the embed to be
To set the channel: /mt channel channel:#channel
Set Embed Info
Set Embed Info - Icon, Global Players, Game Logo In Title.
To show the embed settings: /mt info
No. | Info Type | Description |
---|---|---|
1 | Icon | Shows server icon in embed. |
2 | Global Players | Shows the number of players on MotorTown. |
3 | Game Logo In Title | Shows title in embed. |
Manage Servers
Add Server - Add a server to the embed.
To add a server use: /mt servers add server:server-name
Remove Server - Remove a server from the embed.
To remove a server use: /mt servers remove displayedserver:server-name
List Servers - Shows current servers on embed.
To show current servers use: /mt servers list
Chat Logger
You must own a MT server & be Verified to gain access to the chat logger. If you are a MT server owner then #submit a ticket on discord requesting access to the MT Chat Logger.
Token
Step 1. - Get Token.
To get token use: /chatlogger viewtokens, keep this as you will need this later.
Step 2. Download the chat logger which will be provided when you contact us.
Step 3. - Place the chat logger inside the root MT server folder
Step 4. - Run the chat logger to generate config.json
file.
Config File
{
"_token": "Enter the token from the discord bot below",
"token": "",
"_serverPath": "Enter the path to the root folder of the server below (leave blank if the exe is in the root folder)",
"serverPath": "",
"_createStartBat": "When true a start.bat file will be created which will start this script and the MT server",
"createStartBat": false
}
Step 5. - Configuring the config.json
file.
- Place your
token
inside the token field. - Leave the
serverPath
blank if you have placed the chatlogger in the root folder. - (optional) Set
createStartBat
to true which will create a batch file that will start the MT server and the chat logger at the same time.
Step 6. - Run the chat logger which should now open a console window and you should see a Success! message, if not view the Errors & Warnings below.
Webhooks
Step 7. Its now time to link a token to a channel. There are two options
Option 1 (Recommended). - Auto generate webhook by channel.
token - Select token.
channel - Where to send the in-game messages.
webhookname - (optional) Set the display name of the webhook.
Option 2. - Give existing webhook URL.
Errors & Warnings
Message | Description |
---|---|
No token found! | Token is not specified in the config.json file. |
Invalid token! | Token is not vaild, copy valid token from the bot. |
Config file is not valid JSON! | config.json file is invalid asdasds |
No valid motortown server path found! | Chatlogger is not in the root folder or specified folder is not correct. |
Error connecting to API! | Script cannot connect to our API. #submit a ticket for help. |
Unable to attach to server! | Script cannot read files. |
Your version of the logger is too old! | Chat logger out of date. |
Asset files not found! | Chat logger is corrupt, re-download. |
New version available! | New version available for download. |
You didn't use the start.bat file and it is enabled in the config! | createStartBat enabled in config.json, but wasn't used. |
Bot Permissions
These are the bot's permissions:
- Read Messages/View Channels - Needed to read messages & view channels in server.
- Send Messages - Needed to send messages in server.
- Read Message History - Needed to read message history.
- Manage Webhooks - Needed to create webhook for ChatLogger.