modmail-dev / Modmail

A Discord bot that functions as a shared inbox between staff and members, similar to Reddit's Modmail.
https://docs.modmail.dev
GNU Affero General Public License v3.0
1.58k stars 4.59k forks source link

Created confirm_thread_creation_timeout config #3304

Open sebkuip opened 1 year ago

sebkuip commented 1 year ago

This PR adds a config variable allowing users to set their own timeout for the confirm_thread_creation.

This required the addition of an ints category of configs for conversion as well.

To make the lower and upper limits work, I have added a new system allowing the setting of limits. This will be compared by a python statement like lower <= value <= upper only for keys specified. It will be tested when the value is set, and reverts to the previous value if invalid.

I have added a description in the json file, along with adding this config to the notes of all other related configs.

Taaku18 commented 11 months ago

Seems like there's a merge conflict. I don't have permission to make the necessary changes, but it looks like this could be fixed by changing ConfirmThreadCreationView in utils.py to take a timeout parameter, and then changing view to view = ConfirmThreadCreationView(timeout=self.bot.config[confirm_thread_creation_timeout]) in thread.py.