You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
507 B
16 lines
507 B
4 years ago
|
namespace Discord
|
||
|
{
|
||
|
public static class AttachmentExtensions
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// The prefix applied to files to indicate that it is a spoiler.
|
||
|
/// </summary>
|
||
|
public const string SpoilerPrefix = "SPOILER_";
|
||
|
/// <summary>
|
||
|
/// Gets whether the message's attachments are spoilers or not.
|
||
|
/// </summary>
|
||
|
public static bool IsSpoiler(this IAttachment attachment)
|
||
|
=> attachment.Filename.StartsWith(SpoilerPrefix);
|
||
|
}
|
||
|
}
|