Giter Club home page Giter Club logo

shopbot's Introduction

ShopBot

Summary:


Introduction

Hi, I coded a cool bot for you. Let me introduce you ShopBot, this bot aims at helping you create your own shops and currencies to fit the needs of your community, your RP server, or anything you need.     (See screenshots)

Here is what the bot can do:

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 compex 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

How to configure

First, you need to create a bot on the Discord Developer Portal:

Follow the instructions, choose a name, accept ToS, then open the Bot tab, Add Bot and confirm:

Feel free to customize your bot's settings, like name or profile picture.


Then, download the code, and alongside install Node.JS :

     

Once the code is downloaded, unzip it in a folder of your choice.

Once Node.JS is installed, navigate to the folder where you put the bot's file. Open the command prompt from this path, and execute the following commands:

npm i
node configure.js

It will ask you the id and the token of the bot, which you can find in the Discord Developer Portal:

You can find the ID here:

You can find the Token here:

Click on Reset Token and then click Copy:

Then put the value you copied in the configure/index.js:


It will then automatically open your browser and ask you to select a Discord Server you want the Bot on.


How to host

I will here present a way of hosting your bot, for free. But if you have another solution to do it, feel free to use it. If you use another solution, just keep in mind that I used a local database, so for the bot to work, the infrastructure must let it change content of files (data/accounts.json, data/currenies.json, data/shops.json). Otherwise, you can change the database system.

First, open the folder of your bot and select the following:

And zip them.


Then, join the Discloud Server, follow server's instructions, and go to the commands channel:

Send the command .upc in the channel and follow the instructions (you will be asked to join another channel and send the zip file)

When it's done uploading, come back to the commands channel and send the command .start. Hopefully, the bot will start, if not, open an issue on Github



Commands

Here are all the commands available for the bot.

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

Screenshots

What members of the discord can see:

Shop
 
Buy | Account
 


Examples of what you as an administrator can see:

Create | Delete a currency:

Create | Delete a shop:

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.

shopbot's People

Contributors

dragonjules avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.