-
-
Notifications
You must be signed in to change notification settings - Fork 741
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
Fix #1216, Add support for spoiler formatting & attachments #1255
Conversation
/// <summary> | ||
/// The prefix applied to files to indicate that it is a spoiler. | ||
/// </summary> | ||
public const string SpoilerPrefix = "SPOILER_"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👀? We're not building with preview compiler versions, are we?
How does this not produce a CI failure?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, this was just my mistake. I didn't build before committing. Also, it seems that CI hasn't been working since we moved to the org.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, we need to get it moved over from Volt's personal repo. cc @RogueException
Should also be added to |
adds the isSpoiler field to uploading files with a webhook, which will only insert "SPOILER_" to the start of the filename. This does not include other fields in the payload, as this is not in the documentation, and was not observed like in the regular client
Fix #1216
Implements support for formatting text as spoilers, and spoiler attachments.
Format
class.|
to the list of characters to escape, since this is used for formatting spoilers.isSpoiler
optional parameter toSendFileAsync
.UploadFileParams
. When this is set to true, the file name will be prefixed with the text"SPOILER_"
. Will also send thehasSpoiler
value in the upload request body.SPOILER_
, and not that thehasSpoiler
property is supplied.IAttachment
which checks if an attachment is a spoiler. Spoilers attachments can be of any type, not just images.