Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading