[Fix] Allow setting channel topic to null when creating channels (#2849)

This commit is contained in:
Mihail Gribkov
2024-02-24 02:51:31 +03:00
committed by GitHub
parent 4a05ba5e8a
commit 7c96844f17
2 changed files with 4 additions and 4 deletions

View File

@@ -119,12 +119,12 @@ jobs:
- name: Push Nightly - name: Push Nightly
if: vars.PUSH_NIGHTLY == 'true' if: vars.PUSH_NIGHTLY == 'true'
run: nuget push ${{ env.ArtifactStagingDirectory }}/*.nupkg -Source ${{ vars.NIGHTLY_FEED }} run: nuget push "${{ env.ArtifactStagingDirectory }}/*.nupkg" -Source ${{ vars.NIGHTLY_FEED }}
- name: Push Nightly to GitHub Pacakges - name: Push Nightly to GitHub Pacakges
if: vars.PUSH_NIGHTLY == 'true' if: vars.PUSH_NIGHTLY == 'true'
run: nuget push ${{ env.ArtifactStagingDirectory }}/*.nupkg -Source ${{ env.REPOSITORY_URL }} run: nuget push "${{ env.ArtifactStagingDirectory }}/*.nupkg" -Source ${{ env.REPOSITORY_URL }}
- name: Push Release - name: Push Release
if: env.IsTagBuild == 'true' && vars.PUSH_NUGET == 'true' if: env.IsTagBuild == 'true' && vars.PUSH_NUGET == 'true'
run: nuget push ${{ env.ArtifactStagingDirectory }}/*.nupkg -Source https://api.nuget.org/v3/index.json run: nuget push "${{ env.ArtifactStagingDirectory }}/*.nupkg" -Source https://api.nuget.org/v3/index.json

View File

@@ -370,7 +370,7 @@ namespace Discord.API
Preconditions.GreaterThan(args.Bitrate, 0, nameof(args.Bitrate)); Preconditions.GreaterThan(args.Bitrate, 0, nameof(args.Bitrate));
Preconditions.NotNullOrWhitespace(args.Name, nameof(args.Name)); Preconditions.NotNullOrWhitespace(args.Name, nameof(args.Name));
Preconditions.AtMost(args.Name.Length, 100, nameof(args.Name)); Preconditions.AtMost(args.Name.Length, 100, nameof(args.Name));
if (args.Topic.IsSpecified) if (args.Topic is { IsSpecified: true, Value: not null })
Preconditions.AtMost(args.Topic.Value.Length, 1024, nameof(args.Name)); Preconditions.AtMost(args.Topic.Value.Length, 1024, nameof(args.Name));
options = RequestOptions.CreateOrClone(options); options = RequestOptions.CreateOrClone(options);