luni3359 / koa-bot

Discord bot
MIT License
3 stars 0 forks source link

Making rolls with lots of dice shouldn't hang the bot #86

Closed luni3359 closed 3 years ago

luni3359 commented 3 years ago

As of now users can make several rolls with the current maximum limit (10,000) of dice per roll. If they roll that many dice per roll in a single message the bot hangs for a few minutes until it gets the results.

luni3359 commented 3 years ago

As of commit d1d6492378a4ce9d15080b249c606f5f1420c589 this is no longer a huge issue as now players are limited to a total of 100 dice per roll. However this still leaves the bot prone to misuse, because one can simply type down multiple large rolls in the same command and somewhat achieve similar results as before. This, however, is really cumbersome to do.

Might have to add a cumulative pool so there can ever be 100 dice in a single use of the !roll command. But as it stands, there is no need to do so.