Closed chandler05 closed 1 year ago
Looks like the package-lock.json
file got a bunch added to it when I ran npm install
. I'm not sure which of it should be kept or removed, if any.
Could this also forward screenshots/images attached to the message? A user may attach one to a modmail message.
I haven't fully looked at this PR but it's certainly something I'm excited about.
With the new Discord features now available, I think the best solution would be to have a thread for each user who messages MojiraBot via DMs in the modmail channel. That's probably not too easy to implement though and as such out of scope for this PR, so let's just land this first and then we can still expand on it later if necessary. (tbh I don't think the volume of modmail would be too large anyway)
I'll need to refactor parts of the PR to match discord's and the bot's new changes, so I can add threads while I do that :)
I've switched the system to use threads, and it will now forward attachments on messages as well. Threads are archived after 24 hours, so a new thread will be created for new messages from that user afterwards, just to make sure modmails are seen. This one is now ready for review!
Purpose
Resolve #226 (probably worth discussing before merging, but it has already been discussed and the general consensus is so far in favor of this) Add the database functionality!
Approach
DMs to Mojira Bot are forwarded to an internal channel and put into a thread. /modmailban to ban a user from using the modmail system. /modmailunban to unban a user from using the modmail system. Reply in a modmail message thread to send a reply back to the user. Threads will be archived after 24h of inactivity, after which a new thread will be created for subsequent messages
Future work
New channel needed for modmail, combine with #209's message event handler.
~Add direct reply functionality when discord.js v13 is added.~