Discord Application Setup
This guide will walk you through creating a Discord Application and obtaining your bot token for Shopify Bot.
Never share your bot token with anyone! It provides full access to your bot and should be kept secure.
Creating a Discord Application
- Navigate to the Discord Developer Portal
- Click the "New Application" button in the top right corner
- Enter a name for your application (e.g., "Shopify Bot")
- Read and accept Discord's Terms of Service
- Click "Create"
Getting Your Application ID (Client ID)
Before adding a bot, you'll need to get your Application ID:
- On the "General Information" page of your application
- Find the "Application ID" field
- Click "Copy" to copy your Application ID (also called Client ID)
- Save this - you'll need it for the
CLIENT_IDin your configuration
Getting Your Bot Token
- In your application settings, click on the "Bot" tab in the left sidebar
- Click the "Add Bot" button
- Confirm by clicking "Yes, do it!"
- Under the bot's username, click "Reset Token"
- Click "Yes, do it!" to confirm
- Copy the token and save it somewhere secure - you'll need this for the
DISCORD_TOKENin your configuration
This token will only be shown once! Make sure to copy and save it securely. If you lose it, you'll need to regenerate a new token.
Bot Configuration
While you're in the Bot settings, you'll want to configure a few important settings:
Privileged Gateway Intents
Scroll down to the "Privileged Gateway Intents" section and enable the following intents:
- Server Members Intent - The bot needs access to member's information & roles.
- Message Content Intent - The bot needs access to messages for some of the util functions.
Bot Permissions
-
Click on the "OAuth2" tab in the left sidebar
-
Click on "URL Generator"
-
Under "Scopes", select:
botapplications.commands(for slash commands)
-
Under "Bot Permissions", select the permissions your bot needs. For Shopify Bot, the following are recommended:
- General Permissions:
- Read Messages/View Channels
- Manage Roles
- Use Slash Commands
- Text Permissions:
- Send Messages
- Embed Links
- Attach Files
- Read Message History
- Add Reactions
- Manage Messages
- General Permissions:
-
Copy the generated URL at the bottom of the page
Inviting Your Bot
- Paste the OAuth2 URL you copied into your browser
- Select the server you want to add the bot to
- Click "Authorize"
- Complete the captcha verification
Your bot should now appear in your Discord server as offline (it will come online once you configure and start Shopify Bot).
Configuration Summary
At this point, you should have the following information ready:
- DISCORD_TOKEN - Your bot token from the Bot tab
- CLIENT_ID - Your Application ID from the General Information page
You'll also need to gather:
- OWNER_IDS - Your Discord user ID (and any other bot owners). To get your Discord user ID:
- Enable Developer Mode in Discord (User Settings → Advanced → Developer Mode)
- Right-click on your username and select "Copy User ID"
Next Steps
Now that you have your Discord Application set up and your credentials ready, you can proceed to configure the .env file with your Discord bot token, client ID, and other settings. Make sure to keep your bot token secure and never share it publicly or commit it to version control.