# Aleo Ambassador Program - Discord Bot
This is a Discord bot for the Aleo Ambassador program that manages and tracks point counts and tickets created by users. Users can query for point count and moderators are able to increment points.
Please note: This bot is currently a work in progress!
## Features
- Currently, the bot is only available in English, but soon users will be able to interact with the bot in 12 languages: English, Russian, Ukrainian, Turkish, French, German, Spanish, Chinese, Korean, Polish, Vietnamese, and Persian.
- Every month, the Bot will automatically update the leaderboard.
- Users can see their point count and user status, as well as the point counts and user statuses of others.
- Moderators are able to add points to users.
- Users are able to display both an all-time leaderboard, and a monthly leaderboard of users ranked by point count.
- When a new user joins the server, `users.json` is automatically updated, placing the user at "Apprentice" status with 0 points be default.
## Setting up the Bot:
- Add the bot to your Discord server by following these steps
1. On your Discord Developer Account, navigate to the [Application Page](https://discord.com/developers/applications) and select "New Application."
2. Click "Create Bot" and copy the Token and save it somewhere secure to be used later.
3. On your bot's page in the OAuth2 tab select the "bot" box under "SCOPES" and give the bot "Administrator" permissions.
4. Use the generated URL at the bottom of the page to add the bot to your server.
- Clone the repo locally using `git clone https://github.com/christianwooddell/Aleo-bot-christianwooddell.git`
- In `config.json`, replace the "Token" value with the Discord Bot token you copied earlier.
- Run `npm install` to install all required dependencies.
- Run `index.js` to run the bot. You will see "Start work" logged to the terminal when the bot is up and running
- Bot can be customized such that certain commands can only be run in certain channels. Update `channel_create_ticket` and `channel_get_points` in `config.json` with the appropriate channel ids.
## Using the Bot:
- Loom showing command functions: https://www.loom.com/share/2eff3c9d4f6b403daf30aed942335ae6
- All commands begin with the prefix "!"
#### Display all-time leaderboard:
- "!create_top" returns a leaderboard of all-time points.
#### Display monthly leaderboard
- "!create_top_2" returns a leaderboard of monthly points.
#### Check point total:
- "!point" will return the user's own point count.
- "!point @otheruser" will return the point count of the other user.
- "!monthly_point" will return the user's own monthly point count.
- "!monthly_point @otheruser" will return the monthly point count of the other user.
#### Add points to an account:
- "!addpoint" followed by @otheruser and number of points to add.
- For example: "!addpoint @otheruser 12" will add 12 points to other user's point total.
- Point total must be a positive, whole integer greater than 0. Users will receive an error message if they attempt to add negative points, zero points, or a non-whole number of points.
- Only moderators will be able to add points. If a user is not a moderator, the bot will let them know they cannot add points.
- Users cannot add points to the bot itself, and will receive an error message if they try.
- Please note: the following are the monthly limits for points earned in a month by user status:
- Apprentice: 30 points per month
- Voyager: 40 points per month
- Maestro: 50 points per month
- Monthly point limits will be automatically reset every month.
#### Check user status:
- "!status" will return the user's own status.
- "!status @otheruser" will return the status of the other user.
#### Create Tickets:
- "!ticket" will cause the bot to respond with a message in the ticketing system. Users will be able to select a language from a dropdown box.
#### Bonus:
- "!Should we hire Christian Wooddell?" will cause the bot to provide a fascinating response.