Getting Started
To set up your Discord.js Giveaway Bot, follow these steps:
1. Environment Setup
-
Clone the repository to your local machine:
git clone https://github.com/ResyncedDesign/GiveawayBot.git cd GiveawayBot
-
Install dependencies:
npm install
-
Create a
.env
file in the root directory and add your Bot Token and Client ID:BOT_TOKEN=YOUR_DISCORD_BOT_TOKEN CLIENT_ID=YOUR_DISCORD_CLIENT_ID
You can get the Bot Token and Client ID from the Discord Developer Portal.
-
Build the bot to be able to run it properly.
npm run build
2. Invite the Bot to Your Server
To invite your bot to a Discord server, use the following OAuth2 URL:
https://discord.com/oauth2/authorize?client_id=YOUR_CLIENT_ID&permissions=8&scope=bot%20applications.commands
Replace YOUR_CLIENT_ID
with the actual Client ID of your bot.
- Open the URL in your browser.
- Select your server and click Authorize.
The bot should now be added to your server!
3. Configuring the Bot
Once the bot is in your server, you can configure its settings using the provided slash commands:
/gsetting
Use this command to change the giveaway embed color and emoji.
- Example:
This sets the embed color to
/gconfig color #ff5733 emoji 🎉
#ff5733
and the emoji to 🎉.
/gcreate
Use this command to create a giveaway.
- Syntax:
/gcreate prize numberofwinners time
- Example:
This creates a giveaway lasting 1 hour with 2 winners for a Nitro Subscription.
/gcreate Nitro Subscription 2 1h
4. Running the Bot
To start the bot you must first build/compile it using:
npm run build
Then you can start the bot using:
npm run start
The bot should now be online and ready to manage giveaways in your server!
For more advanced configurations and troubleshooting, refer to the documentation.