Giveaways
Codyx allows you to easily host giveaways directly within your Discord server using slash commands.
Configuration (Web Dashboard)
Basic giveaway settings can be configured via the Web Dashboard under a "Giveaways" or similar section:
- Enable Giveaway Feature: A master switch to enable or disable giveaway commands for the server.
- Manager Roles: Use the multi-select dropdown to choose roles that are allowed to use the
/giveaway start
command (and potentially other management commands like reroll or end, if implemented). If no roles are selected, typically only server administrators can manage giveaways.
Permissions Required: Users running giveaway commands need the roles specified in the dashboard (or Administrator permission). The bot needs permissions to Send Messages, Embed Links, Read Message History, and Add Reactions in the channel where the giveaway is hosted.
Starting a Giveaway
Use the /giveaway start
command to initiate a new giveaway. You will need to provide the following information:
duration
: How long the giveaway should run before a winner is drawn. Specify using units likem
(minutes),h
(hours),d
(days),w
(weeks). Examples:10m
,2.5h
,3d
,1w
.winners
: The number of winners to select. Must be at least 1.prize
: A description of what is being given away.required-role
(Optional): Select a role that users must have in order to enter the giveaway. If omitted, anyone can enter.- (Implicit) Channel: The giveaway message will be posted in the channel where you run the command.
When started, the bot will post an embed message containing the prize details, number of winners, and the end time. It will typically include a button (e.g., 🎉) for users to click to enter.
Entering a Giveaway
- Find the giveaway message posted by the bot.
- Click the entry button (e.g., 🎉) below the embed.
- If a required role was set, the bot will check if you have that role before accepting your entry.
- You should receive confirmation (often ephemeral) that your entry was successful or denied (if missing the role).
Ending a Giveaway & Drawing Winners
- When the specified duration expires, the bot automatically ends the giveaway.
- It collects all valid entrants (users who clicked the button and met any role requirements).
- It randomly selects the specified number of winners from the list of entrants.
- The bot announces the winner(s) by replying to the original giveaway message, usually mentioning the winning user(s).
- The original giveaway embed is updated to indicate that the giveaway has ended and often lists the winners.
Other Potential Commands (Not shown in provided code snippets)
Giveaway systems often include additional management commands, though these were not explicitly detailed in the provided code snippets. Potential commands might include:
/giveaway reroll [message_id]
: Selects a new winner(s) from the original entrants for a giveaway that has already ended./giveaway end [message_id]
: Ends a giveaway prematurely before its scheduled duration expires./giveaway list
: Shows currently active giveaways on the server.
Ensure the bot has the necessary permissions in the giveaway channel. If role requirements are used, make sure the role ID is correct and the bot can check member roles.