fixed command and feature mapping

added a bunch of java doc to moderation interface
added check in case the text channel on the server was deleted while the mod mail thread was still open
This now returns an error to the user side and prompts to message the bot again in order to create a new mod mail thread
This commit is contained in:
Sheldan
2020-05-12 22:44:44 +02:00
parent 8d8f735672
commit 5755d033eb
25 changed files with 338 additions and 21 deletions

View File

@@ -249,6 +249,11 @@ public class ModMailThreadServiceBean implements ModMailThreadService {
if(textChannelFromServer.isPresent()) {
TextChannel textChannel = textChannelFromServer.get();
self.sendUserReply(textChannel, modMailThread, message);
} else {
// in this case there was no text channel on the server associated with the mod mail thread
// close the existing one, so the user can start a new one
message.getChannel().sendMessage(templateService.renderTemplate("modmail_failed_to_forward_message", new Object())).queue();
self.closeModMailThreadInDb(modMailThread.getId());
}
}