Giveaway Module
- class Giveaway(*args: Any, **kwargs: Any)
Manage and operate giveaways within the server.
This class provides commands to start, pause, resume, reroll, end, delete, and view giveaways. It ensures that giveaways are managed securely and can only be controlled by administrators of the servers, and will only return results from the server the command is run from.
Attention
All commands assume minimum bot permissions: View Channel, Send Messages.
- async g_delete(ctx, unique_id)
Delete an existing giveaway from the database and end it with no winner announced.
Aliases:
gd
Syntax:
!!g_delete <ID>
Example:
!!gd 1266587267900899369
- Parameters:
unique_id (int, required) – The unique ID (message ID) of the giveaway to delete.
- Returns:
A confirmation message indicating the giveaway has been forcefully ended and removed from the database.
- Return type:
discord.Message
- async g_end(ctx, giveaway_id=None)
Prematurely end a currently running giveaway and announce a winner. Allow up to 10 seconds for the original giveaway embed to update.
Aliases:
gend
Syntax:
!!g_end <ID>
Example:
!!gend 1266587267900899369
- Parameters:
giveaway_id (int) – The ID of the giveaway message to end.
- Returns:
A confirmation message that the giveaway has been ended, original message updated with winner.
- Return type:
discord.Embed
- async g_pause(ctx, giveaway_id=None)
Pause a currently running giveaway.
Aliases:
gp
,pause
Syntax:
!!g_pause <ID>
Example:
!!gp 1266587267900899369
- Parameters:
giveaway_id (int) – The unique ID (message ID) of the giveaway message to pause.
- Returns:
A message confirming the giveaway pause and providing a link to the paused giveaway.
- Return type:
discord.Embed
- async g_reroll(ctx, giveaway_id=None)
Reroll an ended giveaway. Cannot rereoll a previous winner, if all participants are exhausted the giveaway will end on the last successful reroll.
Aliases:
grr
,reroll
Syntax:
!!g_reroll <ID>
Example:
!!grr 1266587267900899369
- Parameters:
giveaway_id (int) – The unique ID of the ended giveaway message to reroll.
- Returns:
A message confirming the giveaway reroll and providing the new winner’s mention.
- Return type:
discord.Embed
- async g_resume(ctx, giveaway_id=None)
Resume a currently paused giveaway.
Aliases:
gr
,resume
Syntax:
!!g_resume <ID>
Example:
!!gr 1266587267900899369
- Parameters:
giveaway_id (int) – The unique ID (message ID) of the giveaway message to resume.
- Returns:
A message confirming the giveaway resume and providing a link to the resumed giveaway.
- Return type:
discord.Embed
- async g_running(ctx)
See which giveaways are currently running in your server.
If run by owner it will return all running giveaways in the database.
Aliases:
grun
,running
Syntax:
!!g_running
- Returns:
A message listing all currently running giveaways in the server.
- Return type:
discord.Embed
- async g_start(ctx, GiveawayDuration: TimeConverter = None, winner=None, *, prize=None)
Start a giveaway with specified duration, winners, and prize.
Aliases:
gst
,gstart
Syntax:
!!g_start <time> [winners] <prize>
Examples:
!!gst 4m aqours first live penlight # Assumes 1 winner !!gst 2d 3 kotori nesos # 3 winners specified
- Parameters:
GiveawayDuration (TimeConverter (custom converter)) – Duration of the giveaway in hours, minutes, or days (h/m/s/d) (e.g., 4m for 4 minutes, 2d for 2 days).
winner (int, optional) – Number of winners for the giveaway (default is 1).
prize (str, required) – Prize for the giveaway.
- Returns:
A message confirming the start of the giveaway with details.
- Return type:
discord.Embed