A discord bot that interacts with cfx-api by showing an embed with some player information of any FiveM server you wish. Many thanks to @Pablo-1610 for creating the API. Another massive thank you to @Voix for the image edit.
Features
Discord.js v14
Command Handler
Event Handler
Embed FiveM Server Status
Easy to Setup
Create a.envfile (at the root of the folder) and use the config below, Please fill in everything except from FiveMMessageID.
# Discord Bot Token
Token=''
# Your Guild Information
ClientID=''
GuildID=''
# Embed Config
ThumnailImage='https://imgur.com/0KIFmOl.gif'
EmbedColour='#a082ff'
FooterText='• IND 2022'
FooterImage='https://imgur.com/0KIFmOl.gif'
# FiveM Server Status
FiveMEmbedUpdateTime=60 # In Seconds
FiveMServerID='lm6l84' # https://keymaster.fivem.net/
FiveMShowPlayerInformation=false # or true
FiveMChannelID=''
DonationWebsite='https://ind.tebex.io'
# Leave blank for installation, once you have the message ID Put it in
FiveMMessageID=''
Discord Commands Register (Don’t have to do this anymore but useful command handler)
npm run commands
Starting Bot
npm run dev
Copy the message id of the message inside of the FiveMChannelID, and place it in the config. Save any .js file and it will be running!
any command console thats pointing at the root directory, and you should be all good. if your still having problems, i would like to contact you further investigate the issue your having
To Update,
in your .env file, add the following
FiveMShowPlayerInformation=true # or false depending if you want it showing or not.
Download the latest update from the github repository