A Discord Leveling Bot built with Discord.js and Canvas made by roefinoavrililo
Role level, set and add, rank card, more! Easy to use and free!
This code is for people to learn the basics of how to use better-sqlite3, canvas, canvacord, and discord.js. You can use my code for your bot for free. If you see a normal problem like "npm errors can't install" and stuff, please google it first, so you can learn how to fix errors and mistake by yourself. if you see an actual errors like "xp not adding up", "user can't level up", "image error" you can go ahead and ask me in my Discord Server. IF YOU REALLY WANT TO USE THIS BOT FOR YOUR SERVER, BUT IT CAN'T GO ONLINE 24/7, THERE IS A TUTORIAL OF HOW TO HOST IT FOR FREE IN TUTORIAL.MD FILE, REMEMBER THAT REPL.IT DOES NOT SUPPORT BETTER-SQLITE3
Hey, I'm currently taking a break right now from programming after working on a game https://roefino.itch.io/couch-tap (check it out btw its free you can try it now!!) thanks for supporting me and this repository! I can't wait to get back to work!
Tutorial can be found in TUTORIAL.md
file.
- Your Discord Bot Token Guide Here
- Node.js v12.0.0 or newer
- Packages you need to install: Discord.JS, better-sqlite3, canvas or canvacord, fs.
- DB Browser (SQLite) *optional
There are two different type of rank card that you can use, "rank.js.canvacord" uses canvacord or "rank.js.canvas" uses normal canvas YOU CAN ONLY CHOOSE ONE OF THE FILE!!! Remove .canvacord or .canvas if you want to choose which card you think better.
You cannot host this bot on Heroku since Heroku cannot write files such as sqlite files. You can host your bot on Something.Host, Make sure you have join This Server for free hosting services.
Make sure you turn these on! Go to: https://discord.com/developers/applications/yourclientid/bot
Note: Do not share your bot token publicly!
You need to rename config.json.example
file to config.json
and after you done that, you need to specify your bot token, your user id, and prefix.
{
"token": "yourbottoken",
"ownerID": "youruserid",
"prefix": "yourprefix"
}
Your bot requires these permissions:
- ATTACH_FILES (So that your bot will be able to send your rank card)
- SEND_MESSAGES (very important)
- MESSAGE_EMBED or EMBED_LINKS (So that your bot will be able to send an embed message)
- MANAGE_ROLES (This is very important if you want to add leveling roles to your bot.)
Note
- The default prefix is '-', you can change the prefix by simply go to
config.json
file and change the prefix to any prefix you want. - () means optional, [] means mandatory.
Help commands
-help (command name)
Set Prefix commands
-setprefix [new prefix]
Get user ranks
-rank (userID or mention)
Top 10 Leaderboard for the most total xp
-leaderboard
Add Level
-givelevel [userID or Mention] [level amount]
Set Level
-setlevel [userID or Mention] [level amount]
Remove Level
-removelevel [userID or Mention] [level amount]
Role Level
- Add role Level
-rlevel [ add ] [ level ] [ role ]
- Remove role level
-rlevel remove [ level ]
- Show role level
-rlevel show
AND MORE...
▶️ Voice Leveling▶️ Custom Rank Card
- Fork this repository
- Clone your fork:
git clone https://github.com/your-username/Discord.JS-Leveling-Bot.git
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request