odin-bot-v2 icon indicating copy to clipboard operation
odin-bot-v2 copied to clipboard

Bug - points command: Symbols aren't escaped

Open T0nci opened this issue 1 year ago • 2 comments

Complete the following REQUIRED checkboxes:

  • [x] I have thoroughly read and understand The Odin Project Contributing Guide

  • [x] The title of this issue follows the Bug - location of bug: brief description of bug format, e.g. Bug - points command: Extra whitespace causes command to not be called

The following checkbox is OPTIONAL:

  • [x] I would like to be assigned this issue to work on it

1. Description of the Bug:

When people have special/punctuation characters in their names it causes unexpected side effects because of Discord's message formatting. For example I added "`test`" into my name and that caused the points command to show my name as "name test" instead of "name `test`".

That can happen with other symbols as well(the 2 examples are shown in the screenshots below). The second example shows that adding || into ones name triggers the spoiler format(if there is another set of || after) which hides lines of the message in between the vertical lines.

image image image image

2. How To Reproduce:

  1. Use the points command
  2. Find a name where there is Discord formatting or rename your server name to include Discord formatting

3. Expected Behavior:

  1. Use the points command
  2. You see your name with the characters not formatted, instead they are escaped

4. Desktop/Device:

  • Device: Laptop and mobile so far(probably a problem on all devices)
  • OS:
  • Browser:
  • Version:

5. Additional Information:

T0nci avatar Jul 17 '24 12:07 T0nci