Giveaway System
The Giveaway System in OneeChan allows server administrators to create, manage, and remove giveaways using Discord's scheduled events. Users can participate by clicking the event button, ensuring a sm
Features
Automated Giveaway Announcements – Posts an announcement with an interactive button.
Scheduled Giveaways – Uses Discord scheduled events for structured participation.
Custom Winner Selection – Winners can be chosen randomly, by role, or only verified members.
Automated Winner Announcement – Announces winners after the giveaway ends.

Giveaway System Behavior
Creating a Giveaway
Administrators can create a giveaway using:
/giveaway create title:"Nitro Giveaway" criteria:random expiry:24 winners:3
Once the command is executed:
A Discord Scheduled Event is created.
An announcement is posted in the configured Giveaway Channel.
If a Giveaway Ping Role is set, it is pinged.
Users can participate by clicking the "Interested" button.
If an image attachment is included, it will be embedded in the announcement.
Selecting Winners
At the end of the giveaway, the system automatically selects winners based on the configured criteria:
Random – Any participant can win.
Role-Based – Only users with a specific role are eligible.
Verified-Only – Only verified or cross-verified members can win.
The system ensures that muted members or ineligible users are excluded from the selection.
Example:
🎉 Giveaway Winners: @User1, @User2, @User3
Winners will receive a direct message (if enabled) and a public mention in the giveaway channel.
Removing a Giveaway
Administrators can remove an active giveaway using:
/giveaway remove eventId:123456789012345678
If successful, the bot will confirm:
The giveaway has been removed successfully.
The Discord Scheduled Event will also be deleted.
Slash Commands
/giveaway create
– Create a New Giveaway
/giveaway create
– Create a New GiveawayRequired Permission: Administrator
Description: Creates a new giveaway with a title, criteria, expiration time, and number of winners.
title
string
Yes
Title of the giveaway.
criteria
enum
Yes
Winner selection criteria: random
, role
, or verified only
.
expiry
int (hours)
No
Duration before the giveaway expires.
epoch
timestamp
No
Unix timestamp for a specific end time.
winners
int
Yes
Number of winners.
role
@role
No
Required role to participate.
image
attachment
No
Image for the giveaway embed.
sponsored-by
@user
No
The user sponsoring the giveaway.
Example Usage
Random Giveaway (Anyone can join)
/giveaway create title:"Nitro Giveaway" criteria:random expiry:24 winners:3
Role-Exclusive Giveaway (Only members with @VIP role can enter)
/giveaway create title:"VIP Nitro Giveaway" criteria:role expiry:24 winners:3 role:@VIP
Verified-Only Giveaway (Only verified users can enter)
/giveaway create title:"Verified Members Giveaway" criteria:verified expiry:24 winners:3
/giveaway remove
– Remove an Existing Giveaway
/giveaway remove
– Remove an Existing GiveawayRequired Permission: Administrator
Description: Deletes an active giveaway using the event ID.
eventId
ulong
Yes
The Discord event ID of the giveaway.
Example Usage
/giveaway remove eventId:123456789012345678
How Winners Are Selected
Once a giveaway ends, the bot follows these steps:
Randomly selects winners based on the configured criteria.
Announces the winners in chat, tagging them.
Updates the giveaway embed to display the winners.
Notifies winners in DMs if enabled by the server.
Example Winner Announcement:
🎉 Giveaway Winners: @User1, @User2, @User3
If no eligible participants are found, the bot will notify the administrator.
Setup & Behavior
Scheduled Giveaways ensure structured participation and automatic winner selection.
Giveaway Ping Role can be set to notify users of new giveaways.
Redis-Backed Participant Tracking ensures accurate real-time updates.
Automated Announcements keep the giveaway process seamless.
Last updated