This guide walks you through getting GiveawayBot running on your own machine. By the end, you will have a working bot connected to your Discord server and ready to run giveaways.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/resynceddesign/giveawaybot/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites: Node.js 18 or later, Git, and a Discord application with a bot token. Create a Discord application at discord.com/developers/applications if you do not have one yet.
Clone the repository
Clone the GiveawayBot repository to your machine. Replace Then navigate into the project directory:
<folder-name> with your preferred directory name.GitHub CLI
Git
Set up environment variables
Copy the example environment file and fill in your credentials:Open
.env and set both values:.env
- TOKEN: Your bot token from the Discord Developer Portal. Open your application, go to the Bot page, and click Reset Token to reveal it.
- CLIENT_ID: Your application’s ID. Find it on the General Information page of your application — it is labeled Application ID.
Build and start the bot
Compile the TypeScript source to JavaScript, then start the bot:You should see the bot come online in your Discord server once it has connected successfully.
Before starting the bot, enable the two Privileged Gateway Intents on the Discord Developer Portal under your application’s Bot page: Server Members Intent and Message Content Intent. The standard Guilds and Guild Messages intents are non-privileged and enabled by default. Without the privileged intents, the bot will fail to start. See the configuration guide for step-by-step instructions.