Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed bug with tag-raw not displaying leading spaces #347

Merged
merged 1 commit into from
Jan 20, 2022

Conversation

Zabuzard
Copy link
Member

Overview

Implements and closes #273 . In a nutshell, the tag-raw command cant display leading zeroes, which is super annoying when working with code, for example:

Indents are missing

This is a Discord limitation/feature and cant easily be bypassed or turned off.

The PR fixes the issue by going away from sending escaped embeds and instead sending a plain attachment. Discord doesnt mess with the attachments, so the content is displayed plain as it is.

attachment

Which not only fixes the bug, but argueably also looks better.

@Zabuzard Zabuzard added bug Something isn't working enhance command Modify or improve an existing command or group of commands of the bot priority: major labels Jan 18, 2022
@Zabuzard Zabuzard added this to the Migrate existing commands milestone Jan 18, 2022
@Zabuzard Zabuzard self-assigned this Jan 18, 2022
@Zabuzard Zabuzard requested review from a team as code owners January 18, 2022 17:55
instead of escaped markdown in an embed which leads to bugs
@Zabuzard Zabuzard force-pushed the bugfix/tag_raw_leading_spaces branch from 8e8d1a8 to b909857 Compare January 18, 2022 18:04
@Zabuzard
Copy link
Member Author

@Tais993 I dont like the event.reply("").addFile(...), a better way to add a file without that reply("") that I havent seen?

@sonarcloud
Copy link

sonarcloud bot commented Jan 18, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@Zabuzard Zabuzard enabled auto-merge (rebase) January 19, 2022 07:36
@Tais993
Copy link
Member

Tais993 commented Jan 20, 2022

@Tais993 I dont like the event.reply("").addFile(...), a better way to add a file without that reply("") that I havent seen?

Unfortunately, there is not

Copy link
Member

@Tais993 Tais993 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iOS and Android do not have a preview for files, so they'll receive the raw file instead.
Since most (if not all) tags will be viewed, and edited on desktop this solution is fine to me.

@Zabuzard Zabuzard merged commit 12044b8 into develop Jan 20, 2022
@Zabuzard Zabuzard deleted the bugfix/tag_raw_leading_spaces branch January 21, 2022 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhance command Modify or improve an existing command or group of commands of the bot priority: major
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tag-raw does not display leading spaces
3 participants