Hi, I coded a cool bot for you.
Let me introduce you ShopBot, this bot aims at helping to you create your own shops and currencies to fit the needs of your community, your RP server, or anything you need.
(See screenshots)
This bot uses the power of Slash Commands to let you interact with it with the best UI as possible (Embeds, Buttons, Select Menu). So you will not have to worry about remembering complex commands, the bot does everything for you, and prevents you from accidentally making errors.
You can create currencies, then use them in shops you created, in which you can add products, with a name, a description and a price.
Of course, you can manage these currencies, shops and products. You can delete the currencies and the shops. You can update the name, description or price of the products.
Admins can give and take money to users and even empty an account, they can also see the account of anyone. They can see logs (for purchase, give and take) by setting a log channel on your server.
Users can see their own account, and buy in shops.
Thanks to Discord's features, you can customize the permissions for each command in the settings of your server.
You can check screenshots of the bot's commands to see how cool it is :D
If you love the bot, feel free to support me:
Now, let's configure your bot, caution, you need to do it carefully
This repo is the bot's source code, not a bot itself.
To use it, you must host it yourself. There are several methods to do this, some are free, some are paid (Be careful that your hosting solution allows file editing, sometimes called local database, otherwise all the bot's data will be lost if the server restarts).
Once you found the hoster for your bot, here are the steps to follow:
We will first create the bot :
- Go on Discord Developer Portal and login
- Click New Application, give your bot a name, accept the ToS and developer policy
- In the Installation tab, untick User Install, and in Install Link select None
- Copy the Application ID from the General Information tab, save it for later.
- Select tab Bot, click Reset Token, copy the token, save it for later.
- Cutomize the bot as you want (Profile picture, banner, name...). Below Authorization Flow, untick Public Bot, tick Server Members Intent
- Save changes.
- In the OAuth2 tab, in Scopes, select bot and application.commands, then tick the following permissions:
- Read Messages/View Channels
- Send Messages
- Use Slash Commands
- Select Guild Install and copy the generated URL
- Follow this URL and add the bot to the server you want, accept everything, the bot should be added to your server !
Now, we can link the bot to the code, so you can start using it :
- You need to have Node.js installed on your machine.
- Download my code and extract it from the ZIP file (or clone the repo), open the folder where it's located, and open a terminal from here.
- Install the required packages and compile the code by executing the following command:
npm install
- In the bot folder, open the config folder, then open config.json in any text editor, fill it with the informations you saved previously, like following:
{
"clientId": "[The Application ID you have saved]",
"token": "[The Token you have saved]",
"logChannelId": "[The ID of the channel the log should be sent in]",
}
Your Bot is ready to be uploaded on the server ! The following steps may vary depending on your hosting solution.
- Upload the whole ShopBot-main folder on the server.
- Create a routine for restarting the server. Such that the following command is executed from the bot's folder each time the server is restarted.
npm run start
- Open a terminal from the bot' folder and execute the following command :
npm run deploy /a
- Restart the server, or run the following command :
npm run start
All done ! You did it, your bot should be working perfectly ! If you have any problem with it, feel free to message me on Discord, or open an issue on Github
Commands for everyone:
• Shows the account
/account
• Displays the shops
/shop
Admin commands:
/set-log-channel
• Creation commands
/create-currency
/create-shop
/add-product
• Update commands
/update-product
/reorder-shops
• Remove commands
/remove-currency
/remove-shop
/remove-product
• User management commands
/give
/take
/display-account
Configuring bot's commands permissions:
The screenshots come from the project I originally created the bot for.
If something is missing in this document, please open an issue.