feature: Add stickers (#1726)

This commit is contained in:
Paulo
2021-04-28 10:11:28 -03:00
committed by GitHub
parent c21cf48be3
commit 91a906397a
10 changed files with 207 additions and 0 deletions

View File

@@ -164,6 +164,14 @@ namespace Discord
/// </summary>
IReadOnlyDictionary<IEmote, ReactionMetadata> Reactions { get; }
/// <summary>
/// Gets all stickers included in this message.
/// </summary>
/// <returns>
/// A read-only collection of sticker objects.
/// </returns>
IReadOnlyCollection<ISticker> Stickers { get; }
/// <summary>
/// Gets the flags related to this message.
/// </summary>

View File

@@ -0,0 +1,67 @@
using System.Collections.Generic;
namespace Discord
{
/// <summary>
/// Represents a discord sticker.
/// </summary>
public interface ISticker
{
/// <summary>
/// Gets the ID of this sticker.
/// </summary>
/// <returns>
/// A snowflake ID associated with this sticker.
/// </returns>
ulong Id { get; }
/// <summary>
/// Gets the ID of the pack of this sticker.
/// </summary>
/// <returns>
/// A snowflake ID associated with the pack of this sticker.
/// </returns>
ulong PackId { get; }
/// <summary>
/// Gets the name of this sticker.
/// </summary>
/// <returns>
/// A <see langword="string"/> with the name of this sticker.
/// </returns>
string Name { get; }
/// <summary>
/// Gets the description of this sticker.
/// </summary>
/// <returns>
/// A <see langword="string"/> with the description of this sticker.
/// </returns>
string Description { get; }
/// <summary>
/// Gets the list of tags of this sticker.
/// </summary>
/// <returns>
/// A read-only list with the tags of this sticker.
/// </returns>
IReadOnlyCollection<string> Tags { get; }
/// <summary>
/// Gets the asset hash of this sticker.
/// </summary>
/// <returns>
/// A <see langword="string"/> with the asset hash of this sticker.
/// </returns>
string Asset { get; }
/// <summary>
/// Gets the preview asset hash of this sticker.
/// </summary>
/// <returns>
/// A <see langword="string"/> with the preview asset hash of this sticker.
/// </returns>
string PreviewAsset { get; }
/// <summary>
/// Gets the format type of this sticker.
/// </summary>
/// <returns>
/// A <see cref="StickerFormatType"/> with the format type of this sticker.
/// </returns>
StickerFormatType FormatType { get; }
}
}

View File

@@ -0,0 +1,15 @@
namespace Discord
{
/// <summary> Defines the types of formats for stickers. </summary>
public enum StickerFormatType
{
/// <summary> Default value for a sticker format type. </summary>
None = 0,
/// <summary> The sticker format type is png. </summary>
Png = 1,
/// <summary> The sticker format type is apng. </summary>
Apng = 2,
/// <summary> The sticker format type is lottie. </summary>
Lottie = 3,
}
}