Highly automated bot, to handle and fulfill sales, with both stripe and paypal integration, users can purchase your products with automatic delivery.
The store bot was created to simplify the checkout process for customers, as well as providing a unique way to sell products to your clients, including invoicing, logging, paypal & stripe integration, a ticket system, and much more. It is completely free to use, and we hope it will greatly help out many users.
Some of the features:
- Stripe & Paypal Integration
- Easy to use configuration system
- Custom Invoicing
- Support for tickets & redirects
- Automatic delivery of products on purchase
- Logging & events system for developers
This is an example of how to list things you need to use the software and how to install them.
- NodeJS >= v16.13.0
- npm
npm install npm@latest -g
-
Clone the repo or download the files
git clone https://github.com/neurondevelopment/CoreBot.git
-
Install NPM packages
npm install
-
Fill in the information in
config.json, the following fields are required for the bot to starttoken serverID
-
In the discord developer dashboard, where you created your bot and got its token, scroll down to 'Privileged Gateway Intents' and tick the SERVER MEMBERS intent.
-
Fill in the appropriate payment processor API keys (stripe & paypal)
-
Invite or reinvite the bot with the following link, replace YOURCLIENTID with the Client ID of your bot
https://discord.com/api/oauth2/authorize?client_id=YOURCLIENTID&permissions=8&scope=applications.commands%20bot -
Starting the bot
node .OR
node index.js
By default, every command is open for everyone, which is maybe not ideal for some commands. In each command file, there is an array called perms, it looks like perms: [] Inside, you can add either a role ID or a permission to use that command, a role id looking like "843429294848081920", or a permission looking like "ADMINISTRATOR"
The final array should look something like
perms: ["843429294848081920", "MANAGE_MESSAGES"]This will allow anyone with the role that has the ID 843429294848081920, or anyone with the manage messages permission to run this command
Listings can be found in /db/listings.json
"Listing 1": {
"type": "One-Time", // One-Time | Redirect | Ticket
"channelID": "", // Channel ID for the embed to be sent to, must be set for the listing to show up.
"messageID": "", // Message ID of embed will be automatically set by the bot
"embed": {
"colour": "RANDOM",
"description": "New Listing", // Description of listing
"features": [ // Features, separate each feature in the array
"Feature 1",
"Feature 2"
],
"thumbnail": "", // Thumbnail image (optional) will display a square image in top-right of embed (provide a link)
"image": "", // Main image (optional) will display a larger image at the bottom of the embed (provide a link)
"footer": "Neuron Development" // Text at bottom of embed
},
"productInfo": {
"price": "5", // The price of the product, will show up in the embed and also change the price in paypal / stripe
"currency": "£", // For the embed, doesn't affect the actual price of the product
"releaseDate": "{DATE}", // Enter date or use {DATE} to use current date
"usePaypal": true, // Enable use of paypal, set to (true) or (false)
"useStripe": true, // Enable use of stripe, set to (true) or (false)
"success_url": "https://youtube.com/yes", // Where to redirect the user after a successful purchase
"cancel_url": "https://youtube.com", // Where to redirect the user if they cancel a purchase
"format": "{CURRENCY} {PRICE}", // How the price will be displayed in the embed use {CURRENCY} and {PRICE}
"customerRoles": [], // Roles to give to the customer after purchasing. (Will also add global customer roles set in main config)
"redirectURL": "", // URL to redirect to, only applicable if using (Redirect) type
"downloadURL": "", // Download link to provide to customers, only applicable if using (One-Time) type. Leave blank to disable download button
"categoryID": "" // Category ID for tickets to be sent to, only applicable if using (Ticket) type
},
"clients": [] // Will be automatically set by bot, but can also be manually changed if required. It just uses the user's IDs in an array.
} Some users may chose to use the SendGrid API to send customers an email after completing a purchase.
Ensure you have an account setup and then follow the steps below.
- First head here and then either use domain authentication (if you own a domain) which I would recommend, or you can just use Single Sender Verification. You may have to use the second if you don't own a domain.
- Next head to this link and then create an API key and give it full access, then copy that API key into your config.json
- In your config.json you will find a section called fromEmail, in here you can set the address that the email will come from, if you previously authenticated the domain (in the first step) example.com you could use [email protected] as an example, but you can change store to whatever you wish
Some users may find they need to use global commands instead of guild commands, so that they can use the commands in multiple servers. Below is a simple guide for that, just note that any updates to commands will take ~1 hour to update in discord's cache when using global commands.
In the index.js, replace Routes.applicationGuildCommands(client.user.id, serverID) with Routes.applicationCommands(client.user.id), make sure you don't accidentally remove the comma after it either.
Distributed under the MIT License. See LICENSE for more information.