MOH Server Query - Discord-Bot Template

A Discord Bot Template based on discord.js for querying MoH: Allied Assault, Spearhead and Breakthrough servers


Installation

Requires Node.js

  • Create your own Discord-Bot, get your Bot "TOKEN", and add it to your server
  • Clone or download this repo --> github.com/eduzappa18/MOHServerQuery-Discord-Bot
  • Install required dependencies with: npm install
  • Edit config.ini and servers.ini files
  • Start the Bot whit: npm start

If you need more info, google this: "discord.js bot tutorial". There are tons of very well explained tutorials about it.


Config Files
Spoiler: Config Files

config.ini (Bot config)

[bot]

# Your Bot token. Ignore if you use enviroment variables (E.g. Heroku Config Vars)
# Never share your Bot Token with anyone
TOKEN=SuperSecretBotTokenHere

# command to request the list of available servers
svlist_command=!list

# Bot status | Options: online, idle, offline, dnd (Do Not Disturb)
status=online

# Bot activity | Options: PLAYING, STREAMING, LISTENING, WATCHING
activity_type=PLAYING
activity_value=Medal of Honor: Allied Assault

# Embed colors in "Hex format"
# server info embed color
embed_svinfo_color="#308030"
# server list embed color
embed_svlist_color="#808030"
# connection failed embed color
embed_error_color="#803030"


servers.ini (Stores the list of servers)

# Example:
# [Server Name] # DO NOT USE DOTS ".", SEMICOLONS ";", NUMBER SIGNS "#" OR SQUARE BRACKETS "[" & "]" IN THE NAME!!!
# type=mohaa # The type of game: mohaa, mohsh or mohbt
# ip=123.123.123.123 # Server IP
# port=12203 # Server Port
# command=!server # The command to request the server info on Discord

[=|LuV|= Freeze-Tag Server]
type=mohaa
ip=217.182.199.4
port=12203
command=!luv

[=CDX= COUNTDOWN X]
type=mohsh
ip=play.cdx-server.com
port=12203
command=!cdx

[-|RS|- Clan Countdown Server]
type=mohbt
ip=31.186.250.131
port=12205
command=!rs



Screenshots

Spoiler: screenshots


Server List


Medal of Honor: Allied Assault Server Info


Medal of Honor: Allied Assault Spearhead Server Info


Medal of Honor: Allied Assault Breakthrough Server Info


Connection failed message