[FREE] [RELEASE] Cfx bot API

Introduction

Hi, I created this bot because I noticed this module dating back to August 2022 a few months ago, but no one then created documentation or a prototype bot on it. Left by the author himself like this, bare without any other subsequent statement or instruction. This week I started studying the javascript and typescript code of this discord bot module in js. I was able to make an amazing and super functional bot that I now want to share with the community. At this point I am intent on continuing to exploit its potential and perhaps making a documentation on it with the various functions accessible and available in a more clear way for those who would like to create one from scratch with their own ideas. The bot that I will leave you in my github is for illustrative purposes only and a prototype to test this module complete with links to the Cfx.re API.

Module author credits: Pablo-1610
Module I’m referring to: Cfx-re API Library

Available commands + Check event

  • /status-cfx
    Get the general Cfx.re status
  • /status-individuals-cfx
    Get the status of all individual Cfx.re components
  • /server-info
    Get server details from a Cfx.re join code
  • /commands
    List all available commands and their descriptions
  • /refresh-status
    Manually refresh the Cfx.re status
  • /news-outage
    Get the current Cfx.re outage status

checkCfxStatus
I have implemented a check event also regarding the status of Cfx. It works in such a way that if a component’s status is updated then it sends an embed log that can be configured to your liking by modifying the channel ID in the CHANNEL_ID variable

Code Download

  • You can install the code from github: click here

Updated July 15
You can install the new version with new code from github:

Support

If you need support, just write to me below and I will immediately make myself super available to help you. Do you have suggestions, criticisms or innovative ideas to report? Go to my github page and open a pull-request and I’ll get back to you as soon as I can! :slight_smile:

Code is accessible Yes
Subscription-based No
Lines (approximately) 320
Requirements NodeJS; Visual Studio Code
Support Yes
5 Likes

I recommend you organize the code by creating a new handler and wait for the new wiki page you promised. Anyway, great work!

1 Like

Thanks for your feedback! The next update focuses on reorganizing the file into handling, fixing and optimizing the bot

1 Like

Changelog 1.1.0 Summary [PRE-RELEASE LATEST VERSION]

[+] Added /send-status command
[+] Added /news-outage command
[+] Added “fetchCfxStatus” event to fetch fivem status and format the message embed

[-] Removed /cfx-status command (useless)

[^] Code optimization and organization (WIP)
[^] Fixed a bug with the /server-info command

Changelogs 1.2.0 [LATEST VERSION]

[+] Added an handling system

[^] Code optimization and organization
[^] Fixed a bug with the /news-outage command

[-] Removed information regarding “elementClub” and “Tags” from source code while running /server-info

Code Download

You can install the new version with new code from github:

Support

If you need support, just write to me below and I will immediately make myself super available to help you. Do you have suggestions, criticisms or innovative ideas to report? Go to my github page and open a pull-request and I’ll get back to you as soon as I can! :slight_smile:

1 Like