Voxel-Fox-Ltd / MarriageBot

A Discord bot for fake marriages
GNU Affero General Public License v3.0
82 stars 45 forks source link

Add timeout to cached user #16

Closed 4Kaylum closed 5 years ago

4Kaylum commented 5 years ago

When a user runs adopt/marry/makeparent, they're globally added to the bot's cache (bot.proposal_cache) so people can't adopt/marry/makeparent them or their target until the first one times out. For some reason, sometimes the bot doesn't remove them when it's done.

The easiest solution to this I can think of is a timeout on that user - five minutes should do since they're only meant to exist for one anyway. As soon as the five minutes have passed, should they still be in that cache, they'll be autoremoved or ignored.

4Kaylum commented 5 years ago

Closed with ff21537e3ebbfce15f1a65bd60eec64c23369d46