Browse Source

Add null check to AllowedMentions.ToModel()

pull/1865/head
d4n3436 GitHub 4 years ago
parent
commit
99bb13a251
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      src/Discord.Net.Rest/Extensions/EntityExtensions.cs

+ 1
- 0
src/Discord.Net.Rest/Extensions/EntityExtensions.cs View File

@@ -70,6 +70,7 @@ namespace Discord.Rest
}
public static API.AllowedMentions ToModel(this AllowedMentions entity)
{
if (entity == null) return null;
return new API.AllowedMentions()
{
Parse = entity.AllowedTypes?.EnumerateMentionTypes().ToArray(),


Loading…
Cancel
Save