forked from adam/discord-bot-shtik
fixed a bug where we'd immediately crash on any message
This commit is contained in:
parent
54414b8748
commit
c446521977
@ -49,17 +49,16 @@ public class Channel
|
|||||||
path.Push(walker);
|
path.Push(walker);
|
||||||
}
|
}
|
||||||
DefinitePermissionSettings toReturn = new DefinitePermissionSettings();
|
DefinitePermissionSettings toReturn = new DefinitePermissionSettings();
|
||||||
walker = path.Pop();
|
|
||||||
while(walker != null)
|
|
||||||
{
|
|
||||||
toReturn.LewdnessFilterLevel = LewdnessFilterLevel ?? toReturn.LewdnessFilterLevel;
|
|
||||||
toReturn.MeannessFilterLevel = MeannessFilterLevel ?? toReturn.MeannessFilterLevel;
|
|
||||||
toReturn.LinksAllowed = LinksAllowed ?? toReturn.LinksAllowed;
|
|
||||||
toReturn.MaxAttachmentBytes = MaxAttachmentBytes ?? toReturn.MaxAttachmentBytes;
|
|
||||||
toReturn.MaxTextChars = MaxTextChars ?? toReturn.MaxTextChars;
|
|
||||||
toReturn.ReactionsPossible = ReactionsPossible ?? toReturn.ReactionsPossible;
|
|
||||||
|
|
||||||
|
while(path.Count > 0)
|
||||||
|
{
|
||||||
walker = path.Pop();
|
walker = path.Pop();
|
||||||
|
toReturn.LewdnessFilterLevel = walker.LewdnessFilterLevel ?? toReturn.LewdnessFilterLevel;
|
||||||
|
toReturn.MeannessFilterLevel = walker.MeannessFilterLevel ?? toReturn.MeannessFilterLevel;
|
||||||
|
toReturn.LinksAllowed = walker.LinksAllowed ?? toReturn.LinksAllowed;
|
||||||
|
toReturn.MaxAttachmentBytes = walker.MaxAttachmentBytes ?? toReturn.MaxAttachmentBytes;
|
||||||
|
toReturn.MaxTextChars = walker.MaxTextChars ?? toReturn.MaxTextChars;
|
||||||
|
toReturn.ReactionsPossible = walker.ReactionsPossible ?? toReturn.ReactionsPossible;
|
||||||
}
|
}
|
||||||
|
|
||||||
return toReturn;
|
return toReturn;
|
||||||
|
Loading…
Reference in New Issue
Block a user