In Member.lua on lines 220-221, we index a number, leading to an error whenever Member:getPermissions() is called:
local allow, deny = 0, 0
for role in self.roles:iter() do
if role.id ~= guild.id then -- just in case
local overwrite = overwrites:get(role.id)
if overwrite then
deny = deny:union(overwrite:getDeniedPermissions())
allow = allow:union(overwrite:getAllowedPermissions())
end
end
end
In Member.lua on lines 220-221, we index a number, leading to an error whenever
Member:getPermissions()
is called:Looks like this was caused by https://github.com/SinisterRectus/Discordia/commit/6493e89d787199b592c6b1fbb8f562487030053f, when numbers were swapped out for objects. This PR fixes the error by replacing the values of
allow
anddeny
with blankPermissions
objects.