Getting Started

To set up your Discord.js Giveaway Bot, follow these steps:

1. Environment Setup

  1. Clone the repository to your local machine:

    git clone https://github.com/ResyncedDesign/GiveawayBot.git
    cd GiveawayBot
    
  2. Install dependencies:

    npm install
    
  3. 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.

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

  1. Open the URL in your browser.
  2. 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:
    /gconfig color #ff5733 emoji 🎉
    
    This sets the embed color to #ff5733 and the emoji to 🎉.

/gcreate

Use this command to create a giveaway.

  • Syntax:
    /gcreate prize numberofwinners time
    
  • Example:
    /gcreate  Nitro Subscription 2 1h
    
    This creates a giveaway lasting 1 hour with 2 winners for a Nitro Subscription.

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.