AerBot is a fully funtional, open-source Discord bot with many advanced features. It also functions as a prime example of how AeroClient should be used to make great bots.
You can invite the bot here or use this code to run it yourself. To run it yourself check Running the bot Yourself
-
Install node.js and npm if they are not already installed. node.js installer
-
Clone this repo using
git clone https://github.com/aero-ware/aero-bot.git
, thencd
into the repo folder.- Alternatively you can fork this repo
-
Install all the dependencies using
npm i
oryarn
-
Create a new file in the directory called
.env
and add the following: - TheNODE_ENV
is a string that tells the code to run in development or testing mode (decides what prefix to use). - Thetoken
is a string generated by Discord that acts as authentication for the bot. More info on generating tokens - ThetopGGToken
is the access token for the Top.GG API. - ThemongoPath
is a URI that the bot will use to connect to the mongoDB database.Here is an example of a valid .env file:
NODE_ENV=<production/dev>
token=<your discord bot token goes here>
topGGToken=<your top.GG API token goes here>
mongoPath=<uri to your mongoDB server (local or remote)>
- Change default values in
config.json
if necessary. They are currently set to what we would recommend that AeroClient projects use (except prefixes, they can be anything). - Run
yarn dev
ornpm run dev
to run the bot in development mode!- In case you are running this bot on the cloud where TypeScript cannot run, Use
yarn deploy
ornpm run deploy
to run the TypeScript transpiler to run the bot in JavaScript. No functionality should be lost.
- In case you are running this bot on the cloud where TypeScript cannot run, Use
- Generate yourself an invite link using the OAuth2 tab of the application page, check scope
bot
and be sure to give it theAdministrator
permission.
This bot uses the Discord.js and its optional libraries to take advantage of its easy access to the Discord API without having to directly and manually send HTTP requests to Discord.
It also uses our own AeroClient to use its advanced framework to make development a lot easier.
The mongoose library is used to access the mongoDB database.
The axios package is used to perform API requests.
The date-fns package is used to format dates and durations.
Finally, the ms package is used in certain commands to convert strings such as 1d6h
into milliseconds and back.
Information for all the commands of the bot can be seen by running >help
. A web version of this is currently in development here. If anyone wants to help by adding command information, don't hesitate to check Development for more info (The website is in the docs folder).
New info: A react version is being developed in the site
branch!and a dashboard is coming soon!
If you found a bug or want to submit an idea for a feature or something else in between, the best place for that would be in an issue. If you submit an issue, please be sure to apply the appropriate labels so that I can filter through them easier.
Please submit each individual file/collection of files needed for a feature individually, as some may be approved while others may not.
You can join our Discord Server to talk to us about any problems or suggest new features there.
Should you desire to work on what you have suggested, don't hesitate to fork this repo and work on it yourself and create and link a pull request. Please remember to apply the diy-fix label to your issue and PR. DO NOT SUBMIT PRs TO master
.