Add check to make sure response is under 2000 characters
This commit is contained in:
parent
81e1b562e8
commit
2568a72651
2
main.ts
2
main.ts
@ -102,7 +102,7 @@ function replyMessage(message, correctedMessage, abbrsUsed) {
|
||||
plural = abbrsUsed + " acronyms"
|
||||
}
|
||||
if (stringLength > 2000) {
|
||||
replyString = "Sorry, I detected " + plural + "but the resultant response was " + stringLength + " characters long, and Discord only allows a maximum of 2000."
|
||||
replyString = "Sorry, I detected " + plural + ", but the resultant response was " + stringLength + " characters long, and Discord only allows a maximum of 2000."
|
||||
}
|
||||
message.reply({content: replyString, allowedMentions: { repliedUser: false }});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user