Dragory / modmailbot

Modmail Bot is a bot for Discord that makes it easier for users to contact moderators and admins for help.
MIT License
699 stars 701 forks source link

Attachment rehosting and dealing with low disk space #158

Closed Sasiko closed 5 years ago

Sasiko commented 6 years ago

its due to diskspace being full from older attachments of tickets closed so it possible when a ticket is created with attachment and a moderator delete the ticket, have the script delete the the old attachment files from /attachments folder

Dragory commented 6 years ago

Tickets cannot be deleted at the moment, they just get closed/archived. Deleting attachments from closed tickets would make their logs half useless, so I'd rather look into an option to disable logging entirely (which would then also clean up attachments once the thread is closed).

Sasiko commented 6 years ago

at least consider adding an option for us to enable/disable it on config.json as some use platform hosting has only limited disc space usage or options where it reuploads to imgur whenever you close tickets. with imgur api it should be possible but im not sure how much work it would require though

For the moment though, it seems i have to delete attachments every 2nd day till a solution has been introduced by you. thanks for your bot aswell, appreciate your project and continued support

Dragory commented 6 years ago

Alternative hosting solutions for attachments and logs is something I'd definitely like to offer - imgur of course would only support images, but other possible options would be e.g. Google Drive or Dropbox.

I'll look into adding an option to clear old attachments, or to only use Discord's own attachments (i.e. no rehosting at all)!

Sasiko commented 6 years ago

thanks, i look forward to your next features. using discord own attachments is definetly the faster and easier way to choose. relinking it to inbox server

Sasiko commented 5 years ago

would you fancy a donation as an incentive to implement these feature sooner? currently using your modmail and we receive like 80 tickets per day and we have 3-4 ppl who ended up deleting attachement every 5 hours otherwise bot dies due to disk space :/ it litterally became a chore for us

Dragory commented 5 years ago

Hey! The latest update, 2.19.0, added a new attachmentStorage option which can be used to host attachments on discord instead of on the server. If you're still using the bot, give it a try!

Sasiko commented 5 years ago

thanks for the update but im using different modmail long time ago due to constant daily chore of deleting files, im sure other people will like this though.