0

The title speaks for itself, please help, pretty please.

exdii
  • 7
  • 4

1 Answers1

0

The member class contains hasPermission function. So the code to check if message author has permission would look like this:

if message.member:hasPermission(banMembers) then
    -- do action
end

Useful links:

mozkomor05
  • 1,367
  • 11
  • 21
  • it gives off an error `Uncaught Error: D:/Bot/deps/coro-channel.lua:62: D:/Bot/deps/discordia/libs/utils/Emitter.lua:105: Invalid permission: nil` – exdii Jul 05 '20 at 18:00
  • I see. The documentation say that the first parameter is optional so i passed `nil`. But it seems like documentation is outdated. Simply remove the first parameter. I'll update my answer. – mozkomor05 Jul 05 '20 at 18:01