Setting up the Discord Bot
Learn how to setup the Official Donation Store Discord Bot
The Donation Store Discord bot allows for you to sell virtual packages on your store, whether it be alongside your game server or standalone. The Donation Store Discord bot allows for the virtual goods and services to be awarded in your Discord server immediately.
Based on market research, the bot has been provided to you to run on the same server as Donation Store. Because of this, there are a number of steps you will have to follow in order to get it up and running.
Note! Setup Required First
You must setup the bot with Discord by following this doc before installing it on your server as you will need certain credentials from Discord.
The Donation Store Discord bot can award packages automatically, but it can also act as a menu/buy area for your members whether it be for donations or for actual ranks. From within your Discord server, members can browser the packages on your store and type a command to be redirected to a cart where it has been added.
While the install guide will explain how to install the bot on your server, the bot can be obtained easily from the Donation Store website. The install guide will cover how to download it onto your server.
Navigate to the developer applications page on Discord here.
And select "New Application" on the right hand side. Give your bot a name like. You could use your server name if you want!
Next, upload an image for you bot and give your bot a friendly description. Can't think of what it should say? Here is a description that we have provided that explains what this bot does, which we recommend you use:
This is our own instance of the Donation Store Discord Bot that is used to fulfill commands purchased on our webstore
Note! Required in your Description
As you are hosting the Donation Store Bot and are setting the bot up on your Discord account, it is important to let you customers know that. That's why the following must be added to the Bot's description: This bot is provided by Donation Store but the bot itself is not hosted by Donation Store
On the same page as the name and description, copy and paste the Client ID and Client Secret and Paste both into the Settings -> Webstore -> Discord area of the Donation Store Control Panel. These will be used to communicate with the Bot.
Donation Store uses OAuth2 to allow for the app to get user information on the users behalf. For example, when a user purchases a package that has Discord actions, it must get the user's correct username, from Discord, so it can be verified that that person owns that account and so that the actions can be properly fulfilled to the user.
When the user gets the option to "Login with Discord", the customer logs in with Discord, Donation Store then gets a token that is used to request a token that entitles it to read the users username and their avatar. This is then used to get the user's username.
So click OAuth2 in the left hand side of the current menu. Under redirects enter your stores URL (with the OAuth path after it):
So for an example store on store.donationstore.io, it would look like:
Discord requires HTTPS, so if you do not have that setup, you must do this first.
Scopes are what Donation Store requests to have access to related to the user on Discord. Donation Store only needs their username, so choose "identify". By choosing this, Donation Store will now be able to request the user's username and avatar on behalf of that user.
Finally, to control aspects of the server there needs to be a bot. Think of a bot like a user you can invite to your server that can control different aspects of it, however it isn't controlled by a user, instead, by code.
Click Bot on the left hand side and create a bot. Give it a name and an icon. At the bottom of the page, under "Bot Permissions" choose the following:
- Manage Roles
- Kick Members
- Ban Members
- Send Messages
Now that you have setup the bot with Discord, please follow the next doc that explains how to Install the Discord Bot on your server.