Formatting of 'topic changed' for the channelUpdate event log is inconsistent #406
Labels
Bug: Confirmed
Issues that report confirmed bugs.
Meta: Bugfix
PRs that fix bugs or issues.
Priority: Low
Issues that must be fixed or PRs that must be finished and merged with low priority.
Type: Maintenance
Issues and PRs related to the maintenance of a feature or function.
Describe the bug
The formatting of the 'topic changed' entry for the
channelUpdate
event log is inconsistent depending on what the topic is set to. When no topic exists and one is set, or when you unset the topic, it's formatted as if the string length exceeds 64 characters despite there effectively being 0 characters.To Reproduce
Steps to reproduce the behavior:
Expected behavior
If either the old or new topic string length exceeds 64 characters, the entry should be formatted for long strings (i.e. the
Events.Guilds.Logs.ChangeLongText
language string). If both the old or new topic string lengths are under 64 characters (including if they are unset, meaning 0 characters), the entry should be formatted for short strings (i.e. theEvents.Guilds.Logs.ChangeShortText
language string).Screenshots

Long string formatting applied correctly.
Short string formatting applied correctly.

Long string formatting incorrectly applied when topic length is 0 characters long.

Additional context
Relevant code snippet.
rtbyte/src/listeners/guilds/channels/channelUpdateLog.ts
Lines 69 to 78 in 3249f09
The text was updated successfully, but these errors were encountered: