@@ -207,8 +207,10 @@ namespace Discord | |||||
if (_actionRows == null) | if (_actionRows == null) | ||||
{ | { | ||||
_actionRows = new List<ActionRowBuilder>(); | |||||
_actionRows.Add(new ActionRowBuilder().AddComponent(builtButton)); | |||||
_actionRows = new List<ActionRowBuilder> | |||||
{ | |||||
new ActionRowBuilder().AddComponent(builtButton) | |||||
}; | |||||
} | } | ||||
else | else | ||||
{ | { | ||||
@@ -19,11 +19,12 @@ namespace Discord.API.Rest | |||||
public IReadOnlyDictionary<string, object> ToDictionary() | public IReadOnlyDictionary<string, object> ToDictionary() | ||||
{ | { | ||||
var d = new Dictionary<string, object>(); | |||||
d["name"] = $"{Name}"; | |||||
d["description"] = Description; | |||||
d["tags"] = Tags; | |||||
var d = new Dictionary<string, object> | |||||
{ | |||||
["name"] = $"{Name}", | |||||
["description"] = Description, | |||||
["tags"] = Tags | |||||
}; | |||||
string contentType = "image/png"; | string contentType = "image/png"; | ||||
@@ -51,9 +51,10 @@ namespace Discord.API.Rest | |||||
d["file"] = File.Value; | d["file"] = File.Value; | ||||
} | } | ||||
var payload = new Dictionary<string, object>(); | |||||
payload["content"] = Content; | |||||
var payload = new Dictionary<string, object> | |||||
{ | |||||
["content"] = Content | |||||
}; | |||||
if (IsTTS.IsSpecified) | if (IsTTS.IsSpecified) | ||||
payload["tts"] = IsTTS.Value.ToString(); | payload["tts"] = IsTTS.Value.ToString(); | ||||
@@ -39,7 +39,7 @@ namespace Discord.Rest | |||||
return new RoleTags( | return new RoleTags( | ||||
model.BotId.IsSpecified ? model.BotId.Value : null, | model.BotId.IsSpecified ? model.BotId.Value : null, | ||||
model.IntegrationId.IsSpecified ? model.IntegrationId.Value : null, | model.IntegrationId.IsSpecified ? model.IntegrationId.Value : null, | ||||
model.IsPremiumSubscriber.IsSpecified ? true : false); | |||||
model.IsPremiumSubscriber.IsSpecified); | |||||
} | } | ||||
public static API.Embed ToModel(this Embed entity) | public static API.Embed ToModel(this Embed entity) | ||||
{ | { | ||||
@@ -377,7 +377,7 @@ namespace Discord.Net.Queue | |||||
Debug.WriteLine($"[{id}] Retry-After: {info.RetryAfter.Value} ({info.RetryAfter.Value} ms)"); | Debug.WriteLine($"[{id}] Retry-After: {info.RetryAfter.Value} ({info.RetryAfter.Value} ms)"); | ||||
#endif | #endif | ||||
} | } | ||||
else if (info.ResetAfter.HasValue && (request.Options.UseSystemClock.HasValue ? !request.Options.UseSystemClock.Value : false)) | |||||
else if (info.ResetAfter.HasValue && (request.Options.UseSystemClock.HasValue && !request.Options.UseSystemClock.Value)) | |||||
{ | { | ||||
resetTick = DateTimeOffset.UtcNow.Add(info.ResetAfter.Value); | resetTick = DateTimeOffset.UtcNow.Add(info.ResetAfter.Value); | ||||
#if DEBUG_LIMITS | #if DEBUG_LIMITS | ||||
@@ -2453,7 +2453,7 @@ namespace Discord.WebSocket | |||||
SocketStageChannel before = type == "STAGE_INSTANCE_UPDATE" ? stageChannel.Clone() : null; | SocketStageChannel before = type == "STAGE_INSTANCE_UPDATE" ? stageChannel.Clone() : null; | ||||
stageChannel.Update(data, type == "STAGE_INSTANCE_CREATE" ? true : type == "STAGE_INSTANCE_DELETE" ? false : false); | |||||
stageChannel.Update(data, type == "STAGE_INSTANCE_CREATE"); | |||||
switch (type) | switch (type) | ||||
{ | { | ||||
@@ -95,9 +95,7 @@ namespace Discord.WebSocket | |||||
stickerModel.Type == this.Type && | stickerModel.Type == this.Type && | ||||
stickerModel.SortValue == this.SortOrder && | stickerModel.SortValue == this.SortOrder && | ||||
stickerModel.Available == this.Available && | stickerModel.Available == this.Available && | ||||
(stickerModel.Tags.IsSpecified ? | |||||
stickerModel.Tags.Value == string.Join(", ", this.Tags) : | |||||
true); | |||||
(!stickerModel.Tags.IsSpecified || stickerModel.Tags.Value == string.Join(", ", this.Tags)); | |||||
} | } | ||||
else | else | ||||
return base.Equals(obj); | return base.Equals(obj); | ||||