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>
/// Gets whether this guild sticker can be used, may be false due to loss of Server Boosts
/// </summary>
bool? Available { get; }
bool? IsAvailable { get; }

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

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

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


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

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

/// <inheritdoc/>


Loading…
Cancel
Save