0x1DEA / Bingo

Discord bot that gives users a Bingo role on command. Then generates a gif of their pfp being crushed by a tombstone
MIT License
2 stars 1 forks source link

Create temporary bingo #4

Open 0x1DEA opened 5 years ago

0x1DEA commented 5 years ago

A bingo is given along with an optional timestamp.

bingo @user 5m After such time has elapsed, the bingo role is removed
0x1DEA commented 5 years ago

Doned. Added as an argument with a timeout that removes the role.

0x1DEA commented 5 years ago

Temporary Bingo-ing is accomplished with a setTimeout command. If the bot ever has a lapse in uptime then the bingo will never be removed. Some solution could be created to store a user id with a timestamp of the end of the bingo. The file is loaded on start, any overdue bingos are undone and the bot checks the data every minute to see if someones bingo is over. A database could also work but this will likely be running on a local computer and extensive setup would be discouraged if not really needed.