I am looking to create a command !tickets that returns the user’s amount of tickets in the current giveaway.
As far as I can see, there isn’t a built in function to do this. If I need to make a script that is fine, I’d be looking for guidance on how to do that if it is the case.
- User A | 40 Tickets
- User B | 30 Tickets
User A types !tickets in chat.
- Bot responds with User A | 40 Tickets in Giveaway
Streamer types !tickets User B in chat.
- Bot responds with User B | 30 Tickets in Giveaway
Variables & Functions
- userTickets - Number of tickets user currently has in giveaway
- maxTickets - Maximum number of tickets possible in giveaway
- ticketCost - Cost of a single Ticket
- checkPermission() - checks that the user of the command has correct permission to join the giveaway. Returns a message if they don’t.
- atMaxTickets() - checks if user already has maximum entries possible in giveaway, and sends a message back if they do.
- checkCurrency() - checks if the user has sufficient currency to get the desired amount of tickets. Returns a message if they do not have sufficient currency.
There might possibly be more variables and functions, and I’m open to making this into a discussion within the community if needs be. Or paying for custom work. But a boilerplate Python Script that queries the Giveaway table would be a good start.
Thanks in advance!
BanticsTV || https://www.twitch.tv/banticstv