Skip to main content

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.

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.
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.
1

Clone the repository

Clone the GiveawayBot repository to your machine. Replace <folder-name> with your preferred directory name.
GitHub CLI
gh repo clone ResyncedDesign/GiveawayBot <folder-name>
Git
git clone https://github.com/ResyncedDesign/GiveawayBot.git <folder-name>
Then navigate into the project directory:
cd <folder-name>
2

Install dependencies

Install all required packages using your preferred package manager.
npm install
3

Set up environment variables

Copy the example environment file and fill in your credentials:
cp .env.example .env
Open .env and set both values:
.env
TOKEN=
CLIENT_ID=
  • 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.
4

Build and start the bot

Compile the TypeScript source to JavaScript, then start the bot:
npm run build
npm start
You should see the bot come online in your Discord server once it has connected successfully.
5

Invite the bot to your server

Use the OAuth2 URL below to invite the bot. Replace YOUR_CLIENT_ID with the Application ID from step 3.
https://discord.com/oauth2/authorize?client_id=YOUR_CLIENT_ID&permissions=8&integration_type=0&scope=applications.commands+bot
Open the URL in your browser, select the server you want to add the bot to, and click Authorize.
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.

Build docs developers (and LLMs) love