BentoBot
Whitelistbot for FiveM. Contact @Elias#4318 on discord PM for help
This bot will will allow admins on a discord channel to react with ✅ on a HEXID to whitelist them. There is also a dedicated chat for manual commands which will allow you to whitelist or remove a whitelist.
KEEP IN MIND! This is made with the expectations that you have a user_whitelist table with the column identifier and whitelisted where the data type fo identifier is a VARCHAR and whitelisted is an INT. If you want to change this you will have to find the entries to the SQL in the code and change it. Might publish a walkthrough on it. You will also need to host the bot yourself!
Installation:
- Download the bot and save it on the host computer. (recommending on the desktop for convinience)
- Download and install node.js from https://nodejs.org/en/
- Open a CMD and run the following commands:
3.1. cd bot/path (bot path is the directory path to where you downloaded the bot. If you saved it on the desktop and named it whitelistbot the bot/path would be: desktop/whitelistbot. The full command would be "cd desktop/whitelistbot" I recommend to set it up like this in the beginning as you will be able to move it later.)
3.2. Run the command
npm i discord.js
3.3. Run the command
npm i mysql
3.4 Terminate the CMD
-
Go to https://discordapp.com/developers and create an application and then a bot user. Connect the bot to your server with admin perms. Copy the token from the developer app.
-
Go into the bot files and open
token.jsonand paste the token to "token": "HERE", save and exit -
Open
botconfig.json, paste in the right credentials for your SQL host and change the chat names to match your servers chats. (hexIDTextis the chat message where your whitelisthelpers will post a HEX ID (15 charaters example 11000010816f54b.) and this is where the ones with ADMINISTRATOR perms in discord will react with ✅ to whitelist the HEX ID.whitelistCommandChatis where the ones with ADMINISTRATOR perms can manually input commands to either whitelist or remove whitelist (example !whitelist steam:11000010816f54b 1))