ralphkb / sentinel-tickets

Sentinel Tickets is a free and configurable open source discord ticket bot without watermarks or bloat.
https://sentineltickets.com
MIT License
34 stars 8 forks source link

[Feature] Autoclose ticket after X days #45

Closed mrc4tt closed 3 months ago

mrc4tt commented 5 months ago

Option bot to automatically close the ticket channel after X days.

There should be an option for the bot to automatically close the ticket after X days.

Example: Bot closes the ticket channel after 7 days.

ralphkb commented 5 months ago

Hey, this is currently not possible to add but with future major changes to how things work I should be able to add it. Thanks for the suggestion.

SSSXOX commented 3 months ago

good idea 😅

ralphkb commented 3 months ago

Hey @mrc4tt , it's been quite some time but this feature is nearly added. As a start, tickets now automatically get closed if the user left the server. 1611273 I will also look into adding an option to automatically close tickets after X amount of time, I'll try to have it done in a way that checks for the last message by the ticket creator in the ticket channel to see how long ago that message was sent and then close the ticket according to that.

Thanks for the suggestion!

ralphkb commented 3 months ago

Hello, this option has now been added in the latest commit: 2f3a4bf It's disabled by default but you can enable it and use the provided options to configure how often this task should run and the condition to automatically close a ticket. The way it works is by checking the time of the last message of the ticket creator and compare it to your configured time in seconds. By default that time is 1 day in seconds, which means if the ticket creator's last message was 1 day ago, the ticket will automatically be closed by the bot.

Took a while to get this suggestion added but thank you for it! 😄