Admin bot is a discord bot written in Discord.js. It allows you to view relatime game servers info, execute server commands directly from discord, view stats and much more. Command handler and event handler is added so feel free to extend commands and events.
Latest binary builds are always available at:
Admin bot requires less effort to get up and running.
- Node.js 14 or newer
- IW4M Admin version 2021.1.18.2 or newer
-
Windows
- Install Node.js
- Extract
Admin-bot.zip
- Copy
config_default.json
asconfig.json
- Edit
config.json
(add your token, prefix, webfronturl and adminid) - Open console inside the admin bot's directory, type
npm i
and hit enter - Run
StartAdminBot.cmd
ornpm start
in command prompt
-
Linux (Ubuntu 20:04)
- Open Terminal and type:
sudo apt install nodejs npm
mkdir DiscordBot
cd DiscordBot
git clone https://github.com/Sparker-99/Admin-bot.git
cd Admin-bot
npm i
cp config_default.json config.json
nano config.json
(add your token, prefix, webfronturl and adminid)chmod +x ./StartAdminBot.sh
./StartAdminBot.sh
To host the discordBot on any other Linux distro You have to install nodejs and npm for your distro, then the rest is the same on all other Linux Distro.
Download latest build and Extract into old version directory.
- Existing
config.json
anddatabase
folder will be not overwritten by the update.- NOTE: any update of the
config_default.json
need to be merged manually by the user to theconfig.json
.
- NOTE: any update of the
- Any edit done on default
commands
files will be lost. Consider backup or rename the file before update.
Create a discord application from discord developers, click on add bot and copy the token if you dont know how read this Wiki
token
— Insert the bot tokenprefix
— Insert the bot prefix that is used before commands like !helpwebfronturl
— Insert the IW4M Admin webfront url. Example: https://nbsclan.orgadmin_id
— Insert theId
from IW4MAdminSettings.json like the image below:
results_perpage
— Insert a number from 1 upto 10 to set number of results per page of status and players command
custom_presence
— You can set bot's custom presence. Use this following parameters below{m}
— max players count{p}
— players online count{s}
— total server count
status_channel_id
— You can insert a discord channel's id to send autostatus on an intervalstatchan_update_interval
— Specifies how often the bot will update the autostatus in channel in secondscolor
— You can insert a hex colour code to get that colour for all embed discord messagesthumbnail_image_url
— You can insert an image link to get custom thumbnail for all embed discord messagesfooter
— You can insert a footer message to display as footer for all embed discord messagesownerid
— You can insert an admin's or bot owner's client id to lock botinfo for administrator or bot owner
-
- No, Admin bot retrieves cookies 🍪 from webfront which is saved and used for executing commands from Discord. Cookies are valid for 30 days or until host machine restart. You can successfully delete id and password in dm after login success message.
-
- Sqlite Requires Windows-Build-Tools which is a hassle for most windows users. So for Advanced Users Admin bot with Sqlite is available. There is no need for Windows-Build-Tools in case of linux.