Skip to content

Commit

Permalink
[Fix] Allow setting channel topic to null when creating channels (#2849)
Browse files Browse the repository at this point in the history
  • Loading branch information
Misha-133 authored Feb 23, 2024
1 parent 4a05ba5 commit 7c96844
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,12 @@ jobs:
- name: Push Nightly
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
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
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
2 changes: 1 addition & 1 deletion src/Discord.Net.Rest/DiscordRestApiClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ public Task<Channel> CreateGuildChannelAsync(ulong guildId, CreateGuildChannelPa
Preconditions.GreaterThan(args.Bitrate, 0, nameof(args.Bitrate));
Preconditions.NotNullOrWhitespace(args.Name, 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));

options = RequestOptions.CreateOrClone(options);
Expand Down

0 comments on commit 7c96844

Please sign in to comment.