fix: Range of issues presented by analyzer (#2404)
This commit is contained in:
@@ -1756,7 +1756,7 @@ namespace Discord.API
|
||||
if (args.TargetType.Value == TargetUserType.Stream)
|
||||
Preconditions.GreaterThan(args.TargetUserId, 0, nameof(args.TargetUserId));
|
||||
if (args.TargetType.Value == TargetUserType.EmbeddedApplication)
|
||||
Preconditions.GreaterThan(args.TargetApplicationId, 0, nameof(args.TargetUserId));
|
||||
Preconditions.GreaterThan(args.TargetApplicationId, 0, nameof(args.TargetApplicationId));
|
||||
}
|
||||
options = RequestOptions.CreateOrClone(options);
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace Discord.Rest
|
||||
Thread = thread;
|
||||
ThreadType = type;
|
||||
Before = before;
|
||||
After = After;
|
||||
After = after;
|
||||
}
|
||||
|
||||
internal static ThreadUpdateAuditLogData Create(BaseDiscordClient discord, Model log, EntryModel entry)
|
||||
|
||||
@@ -428,7 +428,7 @@ namespace Discord.Rest
|
||||
var ids = args.Roles.Value.Select(r => r.Id);
|
||||
|
||||
if (args.RoleIds.IsSpecified)
|
||||
args.RoleIds.Value.Concat(ids);
|
||||
args.RoleIds = Optional.Create(args.RoleIds.Value.Concat(ids));
|
||||
else
|
||||
args.RoleIds = Optional.Create(ids);
|
||||
}
|
||||
|
||||
@@ -426,7 +426,7 @@ namespace Discord.Rest
|
||||
AllowedMentions allowedMentions, MessageComponent components, Embed embed, RequestOptions options)
|
||||
=> await FollowupWithFileAsync(fileStream, fileName, text, embeds, isTTS, ephemeral, allowedMentions, components, embed, options).ConfigureAwait(false);
|
||||
/// <inheritdoc/>
|
||||
async Task<IUserMessage> IDiscordInteraction.FollowupWithFileAsync(string filePath, string text, string fileName, Embed[] embeds, bool isTTS, bool ephemeral,
|
||||
async Task<IUserMessage> IDiscordInteraction.FollowupWithFileAsync(string filePath, string fileName, string text, Embed[] embeds, bool isTTS, bool ephemeral,
|
||||
AllowedMentions allowedMentions, MessageComponent components, Embed embed, RequestOptions options)
|
||||
=> await FollowupWithFileAsync(filePath, text, fileName, embeds, isTTS, ephemeral, allowedMentions, components, embed, options).ConfigureAwait(false);
|
||||
/// <inheritdoc/>
|
||||
|
||||
Reference in New Issue
Block a user