Browse Source

fix conflicts

pull/2211/head
Cenngo 2 years ago
parent
commit
68260eaa67
19 changed files with 54 additions and 54 deletions
  1. +2
    -2
      src/Discord.Net.Core/Entities/Interactions/ApplicationCommandProperties.cs
  2. +1
    -0
      src/Discord.Net.Core/Entities/Interactions/ContextMenus/MessageCommandBuilder.cs
  3. +1
    -0
      src/Discord.Net.Core/Entities/Interactions/ContextMenus/UserCommandBuilder.cs
  4. +4
    -4
      src/Discord.Net.Core/Entities/Interactions/IApplicationCommand.cs
  5. +4
    -4
      src/Discord.Net.Core/Entities/Interactions/IApplicationCommandOption.cs
  6. +2
    -2
      src/Discord.Net.Core/Entities/Interactions/IApplicationCommandOptionChoice.cs
  7. +0
    -2
      src/Discord.Net.Core/RequestOptions.cs
  8. +4
    -4
      src/Discord.Net.Rest/API/Common/ApplicationCommand.cs
  9. +4
    -4
      src/Discord.Net.Rest/API/Common/ApplicationCommandOption.cs
  10. +2
    -2
      src/Discord.Net.Rest/API/Common/ApplicationCommandOptionChoice.cs
  11. +4
    -4
      src/Discord.Net.Rest/API/Rest/CreateApplicationCommandParams.cs
  12. +2
    -2
      src/Discord.Net.Rest/API/Rest/ModifyApplicationCommandParams.cs
  13. +4
    -4
      src/Discord.Net.Rest/Entities/Interactions/InteractionHelper.cs
  14. +4
    -4
      src/Discord.Net.Rest/Entities/Interactions/RestApplicationCommand.cs
  15. +2
    -2
      src/Discord.Net.Rest/Entities/Interactions/RestApplicationCommandChoice.cs
  16. +4
    -4
      src/Discord.Net.Rest/Entities/Interactions/RestApplicationCommandOption.cs
  17. +4
    -4
      src/Discord.Net.WebSocket/Entities/Interaction/SocketBaseCommand/SocketApplicationCommand.cs
  18. +2
    -2
      src/Discord.Net.WebSocket/Entities/Interaction/SocketBaseCommand/SocketApplicationCommandChoice.cs
  19. +4
    -4
      src/Discord.Net.WebSocket/Entities/Interaction/SocketBaseCommand/SocketApplicationCommandOption.cs

+ 2
- 2
src/Discord.Net.Core/Entities/Interactions/ApplicationCommandProperties.cs View File

@@ -30,7 +30,7 @@ namespace Discord
/// <summary>
/// Gets or sets the localization dictionary for the name field of this command.
/// </summary>
public IReadOnlyDictionary<string, string>? NameLocalizations
public IReadOnlyDictionary<string, string> NameLocalizations
{
get => _nameLocalizations;
set
@@ -52,7 +52,7 @@ namespace Discord
/// <summary>
/// Gets or sets the localization dictionary for the description field of this command.
/// </summary>
public IReadOnlyDictionary<string, string>? DescriptionLocalizations
public IReadOnlyDictionary<string, string> DescriptionLocalizations
{
get => _descriptionLocalizations;
set


+ 1
- 0
src/Discord.Net.Core/Entities/Interactions/ContextMenus/MessageCommandBuilder.cs View File

@@ -118,6 +118,7 @@ namespace Discord
}

_nameLocalizations = new Dictionary<string, string>(nameLocalizations);
return this;
}

/// <summary>


+ 1
- 0
src/Discord.Net.Core/Entities/Interactions/ContextMenus/UserCommandBuilder.cs View File

@@ -116,6 +116,7 @@ namespace Discord
}

_nameLocalizations = new Dictionary<string, string>(nameLocalizations);
return this;
}
/// <summary>


+ 4
- 4
src/Discord.Net.Core/Entities/Interactions/IApplicationCommand.cs View File

@@ -55,12 +55,12 @@ namespace Discord
/// <summary>
/// Gets the localization dictionary for the name field of this command.
/// </summary>
IReadOnlyDictionary<string, string>? NameLocalizations { get; }
IReadOnlyDictionary<string, string> NameLocalizations { get; }

/// <summary>
/// Gets the localization dictionary for the description field of this command.
/// </summary>
IReadOnlyDictionary<string, string>? DescriptionLocalizations { get; }
IReadOnlyDictionary<string, string> DescriptionLocalizations { get; }

/// <summary>
/// Gets the localized name of this command.
@@ -68,7 +68,7 @@ namespace Discord
/// <remarks>
/// Only returned when the `withLocalizations` query parameter is set to <see langword="false"/> when requesting the command.
/// </remarks>
string? NameLocalized { get; }
string NameLocalized { get; }

/// <summary>
/// Gets the localized description of this command.
@@ -76,7 +76,7 @@ namespace Discord
/// <remarks>
/// Only returned when the `withLocalizations` query parameter is set to <see langword="false"/> when requesting the command.
/// </remarks>
string? DescriptionLocalized { get; }
string DescriptionLocalized { get; }

/// <summary>
/// Modifies the current application command.


+ 4
- 4
src/Discord.Net.Core/Entities/Interactions/IApplicationCommandOption.cs View File

@@ -65,12 +65,12 @@ namespace Discord
/// <summary>
/// Gets the localization dictionary for the name field of this command.
/// </summary>
IReadOnlyDictionary<string, string>? NameLocalizations { get; }
IReadOnlyDictionary<string, string> NameLocalizations { get; }

/// <summary>
/// Gets the localization dictionary for the description field of this command.
/// </summary>
IReadOnlyDictionary<string, string>? DescriptionLocalizations { get; }
IReadOnlyDictionary<string, string> DescriptionLocalizations { get; }

/// <summary>
/// Gets the localized name of this command.
@@ -78,7 +78,7 @@ namespace Discord
/// <remarks>
/// Only returned when the `withLocalizations` query parameter is set to <see langword="false"/> when requesting the command.
/// </remarks>
string? NameLocalized { get; }
string NameLocalized { get; }

/// <summary>
/// Gets the localized description of this command.
@@ -86,6 +86,6 @@ namespace Discord
/// <remarks>
/// Only returned when the `withLocalizations` query parameter is set to true when requesting the command.
/// </remarks>
string? DescriptionLocalized { get; }
string DescriptionLocalized { get; }
}
}

+ 2
- 2
src/Discord.Net.Core/Entities/Interactions/IApplicationCommandOptionChoice.cs View File

@@ -20,7 +20,7 @@ namespace Discord
/// <summary>
/// Gets the localization dictionary for the name field of this command.
/// </summary>
IReadOnlyDictionary<string, string>? NameLocalizations { get; }
IReadOnlyDictionary<string, string> NameLocalizations { get; }

/// <summary>
/// Gets the localized name of this command.
@@ -28,6 +28,6 @@ namespace Discord
/// <remarks>
/// Only returned when the `withLocalizations` query parameter is set to <see langword="false"/> when requesting the command.
/// </remarks>
string? NameLocalized { get; }
string NameLocalized { get; }
}
}

+ 0
- 2
src/Discord.Net.Core/RequestOptions.cs View File

@@ -65,8 +65,6 @@ namespace Discord
/// </summary>
public Func<IRateLimitInfo, Task> RatelimitCallback { get; set; }

public IEnumerable<KeyValuePair<string, IEnumerable<string>>> RequestHeaders { get; } = new Dictionary<string, IEnumerable<string>>();

internal bool IgnoreState { get; set; }
internal BucketId BucketId { get; set; }
internal bool IsClientBucket { get; set; }


+ 4
- 4
src/Discord.Net.Rest/API/Common/ApplicationCommand.cs View File

@@ -27,16 +27,16 @@ namespace Discord.API
public Optional<bool> DefaultPermissions { get; set; }

[JsonProperty("name_localizations")]
public Optional<Dictionary<string, string>?> NameLocalizations { get; set; }
public Optional<Dictionary<string, string>> NameLocalizations { get; set; }

[JsonProperty("description_localizations")]
public Optional<Dictionary<string, string>?> DescriptionLocalizations { get; set; }
public Optional<Dictionary<string, string>> DescriptionLocalizations { get; set; }

[JsonProperty("name_localized")]
public Optional<string?> NameLocalized { get; set; }
public Optional<string> NameLocalized { get; set; }

[JsonProperty("description_localized")]
public Optional<string?> DescriptionLocalized { get; set; }
public Optional<string> DescriptionLocalized { get; set; }
// V2 Permissions
[JsonProperty("dm_permission")]


+ 4
- 4
src/Discord.Net.Rest/API/Common/ApplicationCommandOption.cs View File

@@ -40,16 +40,16 @@ namespace Discord.API
public Optional<ChannelType[]> ChannelTypes { get; set; }

[JsonProperty("name_localizations")]
public Optional<Dictionary<string, string>?> NameLocalizations { get; set; }
public Optional<Dictionary<string, string>> NameLocalizations { get; set; }

[JsonProperty("description_localizations")]
public Optional<Dictionary<string, string>?> DescriptionLocalizations { get; set; }
public Optional<Dictionary<string, string>> DescriptionLocalizations { get; set; }

[JsonProperty("name_localized")]
public Optional<string?> NameLocalized { get; set; }
public Optional<string> NameLocalized { get; set; }

[JsonProperty("description_localized")]
public Optional<string?> DescriptionLocalized { get; set; }
public Optional<string> DescriptionLocalized { get; set; }

public ApplicationCommandOption() { }



+ 2
- 2
src/Discord.Net.Rest/API/Common/ApplicationCommandOptionChoice.cs View File

@@ -12,9 +12,9 @@ namespace Discord.API
public object Value { get; set; }

[JsonProperty("name_localizations")]
public Optional<Dictionary<string, string>?> NameLocalizations { get; set; }
public Optional<Dictionary<string, string>> NameLocalizations { get; set; }

[JsonProperty("name_localized")]
public Optional<string?> NameLocalized { get; set; }
public Optional<string> NameLocalized { get; set; }
}
}

+ 4
- 4
src/Discord.Net.Rest/API/Rest/CreateApplicationCommandParams.cs View File

@@ -24,10 +24,10 @@ namespace Discord.API.Rest
public Optional<bool> DefaultPermission { get; set; }

[JsonProperty("name_localizations")]
public Optional<Dictionary<string, string>?> NameLocalizations { get; set; }
public Optional<Dictionary<string, string>> NameLocalizations { get; set; }

[JsonProperty("description_localizations")]
public Optional<Dictionary<string, string>?> DescriptionLocalizations { get; set; }
public Optional<Dictionary<string, string>> DescriptionLocalizations { get; set; }

[JsonProperty("dm_permission")]
public Optional<bool?> DmPermission { get; set; }
@@ -43,8 +43,8 @@ namespace Discord.API.Rest
Description = description;
Options = Optional.Create(options);
Type = type;
NameLocalizations = nameLocalizations?.ToDictionary(x => x.Key, x => x.Value) ?? Optional<Dictionary<string, string>?>.Unspecified;
DescriptionLocalizations = descriptionLocalizations?.ToDictionary(x => x.Key, x => x.Value) ?? Optional<Dictionary<string, string>?>.Unspecified;
NameLocalizations = nameLocalizations?.ToDictionary(x => x.Key, x => x.Value) ?? Optional<Dictionary<string, string>>.Unspecified;
DescriptionLocalizations = descriptionLocalizations?.ToDictionary(x => x.Key, x => x.Value) ?? Optional<Dictionary<string, string>>.Unspecified;
}
}
}

+ 2
- 2
src/Discord.Net.Rest/API/Rest/ModifyApplicationCommandParams.cs View File

@@ -18,9 +18,9 @@ namespace Discord.API.Rest
public Optional<bool> DefaultPermission { get; set; }

[JsonProperty("name_localizations")]
public Optional<Dictionary<string, string>?> NameLocalizations { get; set; }
public Optional<Dictionary<string, string>> NameLocalizations { get; set; }

[JsonProperty("description_localizations")]
public Optional<Dictionary<string, string>?> DescriptionLocalizations { get; set; }
public Optional<Dictionary<string, string>> DescriptionLocalizations { get; set; }
}
}

+ 4
- 4
src/Discord.Net.Rest/Entities/Interactions/InteractionHelper.cs View File

@@ -103,7 +103,7 @@ namespace Discord.Rest
? arg.IsDefaultPermission.Value
: Optional<bool>.Unspecified,
NameLocalizations = arg.NameLocalizations?.ToDictionary(),
DescriptionLocalizations = arg.DescriptionLocalizations?.ToDictionary()
DescriptionLocalizations = arg.DescriptionLocalizations?.ToDictionary(),

// TODO: better conversion to nullable optionals
DefaultMemberPermission = arg.DefaultMemberPermissions.ToNullable(),
@@ -143,7 +143,7 @@ namespace Discord.Rest
? arg.IsDefaultPermission.Value
: Optional<bool>.Unspecified,
NameLocalizations = arg.NameLocalizations?.ToDictionary(),
DescriptionLocalizations = arg.DescriptionLocalizations?.ToDictionary()
DescriptionLocalizations = arg.DescriptionLocalizations?.ToDictionary(),

// TODO: better conversion to nullable optionals
DefaultMemberPermission = arg.DefaultMemberPermissions.ToNullable(),
@@ -188,7 +188,7 @@ namespace Discord.Rest
? arg.IsDefaultPermission.Value
: Optional<bool>.Unspecified,
NameLocalizations = arg.NameLocalizations?.ToDictionary(),
DescriptionLocalizations = arg.DescriptionLocalizations?.ToDictionary()
DescriptionLocalizations = arg.DescriptionLocalizations?.ToDictionary(),

// TODO: better conversion to nullable optionals
DefaultMemberPermission = arg.DefaultMemberPermissions.ToNullable(),
@@ -310,7 +310,7 @@ namespace Discord.Rest
? arg.IsDefaultPermission.Value
: Optional<bool>.Unspecified,
NameLocalizations = arg.NameLocalizations?.ToDictionary(),
DescriptionLocalizations = arg.DescriptionLocalizations?.ToDictionary()
DescriptionLocalizations = arg.DescriptionLocalizations?.ToDictionary(),

// TODO: better conversion to nullable optionals
DefaultMemberPermission = arg.DefaultMemberPermissions.ToNullable(),


+ 4
- 4
src/Discord.Net.Rest/Entities/Interactions/RestApplicationCommand.cs View File

@@ -41,12 +41,12 @@ namespace Discord.Rest
/// <summary>
/// Gets the localization dictionary for the name field of this command.
/// </summary>
public IReadOnlyDictionary<string, string>? NameLocalizations { get; private set; }
public IReadOnlyDictionary<string, string> NameLocalizations { get; private set; }

/// <summary>
/// Gets the localization dictionary for the description field of this command.
/// </summary>
public IReadOnlyDictionary<string, string>? DescriptionLocalizations { get; private set; }
public IReadOnlyDictionary<string, string> DescriptionLocalizations { get; private set; }

/// <summary>
/// Gets the localized name of this command.
@@ -54,7 +54,7 @@ namespace Discord.Rest
/// <remarks>
/// Only returned when the `withLocalizations` query parameter is set to <see langword="false"/> when requesting the command.
/// </remarks>
public string? NameLocalized { get; private set; }
public string NameLocalized { get; private set; }

/// <summary>
/// Gets the localized description of this command.
@@ -62,7 +62,7 @@ namespace Discord.Rest
/// <remarks>
/// Only returned when the `withLocalizations` query parameter is set to <see langword="false"/> when requesting the command.
/// </remarks>
public string? DescriptionLocalized { get; private set; }
public string DescriptionLocalized { get; private set; }

/// <inheritdoc/>
public DateTimeOffset CreatedAt


+ 2
- 2
src/Discord.Net.Rest/Entities/Interactions/RestApplicationCommandChoice.cs View File

@@ -18,7 +18,7 @@ namespace Discord.Rest
/// <summary>
/// Gets the localization dictionary for the name field of this command option choice.
/// </summary>
public IReadOnlyDictionary<string, string>? NameLocalizations { get; }
public IReadOnlyDictionary<string, string> NameLocalizations { get; }

/// <summary>
/// Gets the localized name of this command option choice.
@@ -26,7 +26,7 @@ namespace Discord.Rest
/// <remarks>
/// Only returned when the `withLocalizations` query parameter is set to <see langword="false"/> when requesting the command.
/// </remarks>
public string? NameLocalized { get; }
public string NameLocalized { get; }

internal RestApplicationCommandChoice(Model model)
{


+ 4
- 4
src/Discord.Net.Rest/Entities/Interactions/RestApplicationCommandOption.cs View File

@@ -51,12 +51,12 @@ namespace Discord.Rest
/// <summary>
/// Gets the localization dictionary for the name field of this command option.
/// </summary>
public IReadOnlyDictionary<string, string>? NameLocalizations { get; private set; }
public IReadOnlyDictionary<string, string> NameLocalizations { get; private set; }

/// <summary>
/// Gets the localization dictionary for the description field of this command option.
/// </summary>
public IReadOnlyDictionary<string, string>? DescriptionLocalizations { get; private set; }
public IReadOnlyDictionary<string, string> DescriptionLocalizations { get; private set; }

/// <summary>
/// Gets the localized name of this command option.
@@ -64,7 +64,7 @@ namespace Discord.Rest
/// <remarks>
/// Only returned when the `withLocalizations` query parameter is set to <see langword="false"/> when requesting the command.
/// </remarks>
public string? NameLocalized { get; private set; }
public string NameLocalized { get; private set; }

/// <summary>
/// Gets the localized description of this command option.
@@ -72,7 +72,7 @@ namespace Discord.Rest
/// <remarks>
/// Only returned when the `withLocalizations` query parameter is set to <see langword="false"/> when requesting the command.
/// </remarks>
public string? DescriptionLocalized { get; private set; }
public string DescriptionLocalized { get; private set; }

internal RestApplicationCommandOption() { }



+ 4
- 4
src/Discord.Net.WebSocket/Entities/Interaction/SocketBaseCommand/SocketApplicationCommand.cs View File

@@ -53,12 +53,12 @@ namespace Discord.WebSocket
/// <summary>
/// Gets the localization dictionary for the name field of this command.
/// </summary>
public IReadOnlyDictionary<string, string>? NameLocalizations { get; private set; }
public IReadOnlyDictionary<string, string> NameLocalizations { get; private set; }

/// <summary>
/// Gets the localization dictionary for the description field of this command.
/// </summary>
public IReadOnlyDictionary<string, string>? DescriptionLocalizations { get; private set; }
public IReadOnlyDictionary<string, string> DescriptionLocalizations { get; private set; }

/// <summary>
/// Gets the localized name of this command.
@@ -66,7 +66,7 @@ namespace Discord.WebSocket
/// <remarks>
/// Only returned when the `withLocalizations` query parameter is set to <see langword="false"/> when requesting the command.
/// </remarks>
public string? NameLocalized { get; private set; }
public string NameLocalized { get; private set; }

/// <summary>
/// Gets the localized description of this command.
@@ -74,7 +74,7 @@ namespace Discord.WebSocket
/// <remarks>
/// Only returned when the `withLocalizations` query parameter is set to <see langword="false"/> when requesting the command.
/// </remarks>
public string? DescriptionLocalized { get; private set; }
public string DescriptionLocalized { get; private set; }

/// <inheritdoc/>
public DateTimeOffset CreatedAt


+ 2
- 2
src/Discord.Net.WebSocket/Entities/Interaction/SocketBaseCommand/SocketApplicationCommandChoice.cs View File

@@ -18,7 +18,7 @@ namespace Discord.WebSocket
/// <summary>
/// Gets the localization dictionary for the name field of this command option choice.
/// </summary>
public IReadOnlyDictionary<string, string>? NameLocalizations { get; private set; }
public IReadOnlyDictionary<string, string> NameLocalizations { get; private set; }

/// <summary>
/// Gets the localized name of this command option choice.
@@ -26,7 +26,7 @@ namespace Discord.WebSocket
/// <remarks>
/// Only returned when the `withLocalizations` query parameter is set to <see langword="false"/> when requesting the command.
/// </remarks>
public string? NameLocalized { get; private set; }
public string NameLocalized { get; private set; }

internal SocketApplicationCommandChoice() { }
internal static SocketApplicationCommandChoice Create(Model model)


+ 4
- 4
src/Discord.Net.WebSocket/Entities/Interaction/SocketBaseCommand/SocketApplicationCommandOption.cs View File

@@ -51,12 +51,12 @@ namespace Discord.WebSocket
/// <summary>
/// Gets the localization dictionary for the name field of this command option.
/// </summary>
public IReadOnlyDictionary<string, string>? NameLocalizations { get; private set; }
public IReadOnlyDictionary<string, string> NameLocalizations { get; private set; }

/// <summary>
/// Gets the localization dictionary for the description field of this command option.
/// </summary>
public IReadOnlyDictionary<string, string>? DescriptionLocalizations { get; private set; }
public IReadOnlyDictionary<string, string> DescriptionLocalizations { get; private set; }

/// <summary>
/// Gets the localized name of this command option.
@@ -64,7 +64,7 @@ namespace Discord.WebSocket
/// <remarks>
/// Only returned when the `withLocalizations` query parameter is set to <see langword="false"/> when requesting the command.
/// </remarks>
public string? NameLocalized { get; private set; }
public string NameLocalized { get; private set; }

/// <summary>
/// Gets the localized description of this command option.
@@ -72,7 +72,7 @@ namespace Discord.WebSocket
/// <remarks>
/// Only returned when the `withLocalizations` query parameter is set to <see langword="false"/> when requesting the command.
/// </remarks>
public string? DescriptionLocalized { get; private set; }
public string DescriptionLocalized { get; private set; }

internal SocketApplicationCommandOption() { }
internal static SocketApplicationCommandOption Create(Model model)


Loading…
Cancel
Save