Skip to content

Commit

Permalink
Limit new thread message count to 50 (#1980)
Browse files Browse the repository at this point in the history
  • Loading branch information
freya022 committed Jan 16, 2022
1 parent 406d49d commit eb510ed
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -99,7 +99,7 @@ protected Long handleInternally(DataObject content)

//Discord will only ever allow this property to show up to 50,
// so we don't want to update it to be over 50 because we don't want users to use it incorrectly.
int newMessageCount = Math.max(gThread.getMessageCount() + 1, 50);
int newMessageCount = Math.min(gThread.getMessageCount() + 1, 50);
gThread.setMessageCount(newMessageCount);
}
}
Expand Down

0 comments on commit eb510ed

Please sign in to comment.