From 53a111872e21d212730b23db8b4e3e589d918ece Mon Sep 17 00:00:00 2001 From: Rapptz Date: Fri, 1 Jul 2022 20:10:42 -0400 Subject: [PATCH] Fix ArrayFlags._from_value not having an initial value --- discord/flags.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discord/flags.py b/discord/flags.py index 47e170755..dbf88e650 100644 --- a/discord/flags.py +++ b/discord/flags.py @@ -1468,7 +1468,7 @@ class ArrayFlags(BaseFlags): @classmethod def _from_value(cls: Type[Self], value: List[int]) -> Self: self = cls.__new__(cls) - self.value = reduce(lambda a, b: a | (1 << b - 1), value) + self.value = reduce(lambda a, b: a | (1 << b - 1), value, 0) return self def to_array(self) -> List[int]: