fix: unsupported property causes an exception (#1469)
fix for: https://github.com/discord-net/Discord.Net/issues/1436 `SlowModeInterval` property causes an exception for Announcement Channel feature if it is enabled on discord. Should be checked whether it is specified or not before set to property.
This commit is contained in:
committed by
GitHub
parent
b8fa464125
commit
468f8264d0
@@ -42,6 +42,7 @@ namespace Discord.Rest
|
||||
base.Update(model);
|
||||
CategoryId = model.CategoryId;
|
||||
Topic = model.Topic.Value;
|
||||
if (model.SlowMode.IsSpecified)
|
||||
SlowModeInterval = model.SlowMode.Value;
|
||||
IsNsfw = model.Nsfw.GetValueOrDefault();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user