Skip to content
This repository has been archived by the owner on Sep 7, 2023. It is now read-only.

aero-ware/aero-bot

Repository files navigation

aero-bot

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.

Inviting the bot to your server

You can invite the bot here or use this code to run it yourself. To run it yourself check Running the bot Yourself

Running the Bot Yourself

  1. Install node.js and npm if they are not already installed. node.js installer

  2. Clone this repo using git clone https://github.com/aero-ware/aero-bot.git, then cd into the repo folder.

    • Alternatively you can fork this repo
  3. Install all the dependencies using npm i or yarn

  4. Create a new file in the directory called .env and add the following: - The NODE_ENV is a string that tells the code to run in development or testing mode (decides what prefix to use). - The token is a string generated by Discord that acts as authentication for the bot. More info on generating tokens - The topGGToken is the access token for the Top.GG API. - The mongoPath 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)>
  1. 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).
  2. Run yarn dev or npm 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 or npm run deploy to run the TypeScript transpiler to run the bot in JavaScript. No functionality should be lost.
  3. Generate yourself an invite link using the OAuth2 tab of the application page, check scope bot and be sure to give it the Administrator permission.

Library Documentation

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.


Bot Documentation

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!


Development

Filing Issues

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.

Discord

You can join our Discord Server to talk to us about any problems or suggest new features there.

Implementing fixes/features yourself

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.