Browse Source

Rename Available sticker field to IsAvailable

pull/1923/head
quin lynch 3 years ago
parent
commit
fbf2bb9d8e
4 changed files with 7 additions and 7 deletions
  1. +1
    -1
      src/Discord.Net.Core/Entities/Stickers/ISticker.cs
  2. +2
    -2
      src/Discord.Net.Rest/Entities/Messages/Sticker.cs
  3. +3
    -3
      src/Discord.Net.WebSocket/Entities/Stickers/SocketSticker.cs
  4. +1
    -1
      src/Discord.Net.WebSocket/Entities/Stickers/SocketUnknownSticker.cs

+ 1
- 1
src/Discord.Net.Core/Entities/Stickers/ISticker.cs View File

@@ -59,7 +59,7 @@ namespace Discord
/// <summary> /// <summary>
/// Gets whether this guild sticker can be used, may be false due to loss of Server Boosts /// Gets whether this guild sticker can be used, may be false due to loss of Server Boosts
/// </summary> /// </summary>
bool? Available { get; }
bool? IsAvailable { get; }


/// <summary> /// <summary>
/// Gets the standard sticker's sort order within its pack /// Gets the standard sticker's sort order within its pack


+ 2
- 2
src/Discord.Net.Rest/Entities/Messages/Sticker.cs View File

@@ -20,7 +20,7 @@ namespace Discord.Rest
/// <inheritdoc /> /// <inheritdoc />
public StickerType Type { get; protected set; } public StickerType Type { get; protected set; }
/// <inheritdoc /> /// <inheritdoc />
public bool? Available { get; protected set; }
public bool? IsAvailable { get; protected set; }
/// <inheritdoc /> /// <inheritdoc />
public int? SortOrder { get; protected set; } public int? SortOrder { get; protected set; }
/// <inheritdoc /> /// <inheritdoc />
@@ -47,7 +47,7 @@ namespace Discord.Rest
Tags = model.Tags.IsSpecified ? model.Tags.Value.Split(',').Select(x => x.Trim()).ToArray() : new string[0]; Tags = model.Tags.IsSpecified ? model.Tags.Value.Split(',').Select(x => x.Trim()).ToArray() : new string[0];
Type = model.Type; Type = model.Type;
SortOrder = model.SortValue; SortOrder = model.SortValue;
Available = model.Available;
IsAvailable = model.Available;
Format = model.FormatType; Format = model.FormatType;
} }




+ 3
- 3
src/Discord.Net.WebSocket/Entities/Stickers/SocketSticker.cs View File

@@ -35,7 +35,7 @@ namespace Discord.WebSocket
public StickerFormatType Format { get; protected set; } public StickerFormatType Format { get; protected set; }


/// <inheritdoc/> /// <inheritdoc/>
public virtual bool? Available { get; protected set; }
public virtual bool? IsAvailable { get; protected set; }


/// <inheritdoc/> /// <inheritdoc/>
public virtual int? SortOrder { get; private set; } public virtual int? SortOrder { get; private set; }
@@ -65,7 +65,7 @@ namespace Discord.WebSocket
Name = model.Name; Name = model.Name;
Description = model.Desription; Description = model.Desription;
PackId = model.PackId; PackId = model.PackId;
Available = model.Available;
IsAvailable = model.Available;
Format = model.FormatType; Format = model.FormatType;
Type = model.Type; Type = model.Type;
SortOrder = model.SortValue; SortOrder = model.SortValue;
@@ -94,7 +94,7 @@ namespace Discord.WebSocket
stickerModel.PackId == PackId && stickerModel.PackId == PackId &&
stickerModel.Type == Type && stickerModel.Type == Type &&
stickerModel.SortValue == SortOrder && stickerModel.SortValue == SortOrder &&
stickerModel.Available == Available &&
stickerModel.Available == IsAvailable &&
(!stickerModel.Tags.IsSpecified || stickerModel.Tags.Value == string.Join(", ", Tags)); (!stickerModel.Tags.IsSpecified || stickerModel.Tags.Value == string.Join(", ", Tags));
} }
else else


+ 1
- 1
src/Discord.Net.WebSocket/Entities/Stickers/SocketUnknownSticker.cs View File

@@ -26,7 +26,7 @@ namespace Discord.WebSocket
public override ulong PackId public override ulong PackId
=> 0; => 0;
/// <inheritdoc/> /// <inheritdoc/>
public override bool? Available
public override bool? IsAvailable
=> null; => null;


/// <inheritdoc/> /// <inheritdoc/>


Loading…
Cancel
Save