Browse Source

Fix incorrect URL checks

pull/1923/head
quin lynch 4 years ago
parent
commit
75b10e9195
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      src/Discord.Net.Core/Entities/Interactions/Message Components/ComponentBuilder.cs

+ 2
- 1
src/Discord.Net.Core/Entities/Interactions/Message Components/ComponentBuilder.cs View File

@@ -422,7 +422,8 @@ namespace Discord

if (this.Style == ButtonStyle.Link && !string.IsNullOrEmpty(this.CustomId))
this.CustomId = null;
else if (!string.IsNullOrEmpty(this.Url))

else if (this.Style != ButtonStyle.Link && !string.IsNullOrEmpty(this.Url)) // Thanks 𝑴𝒓𝑪𝒂𝒌𝒆𝑺𝒍𝒂𝒚𝒆𝒓 :D
this.Url = null;

return new ButtonComponent(this.Style, this.Label, this.Emote, this.CustomId, this.Url, this.Disabled);


Loading…
Cancel
Save