Alchemy.Events.on_user_ban
You're seeing just the macro
on_user_ban
, go back to Alchemy.Events module for more information.
Registers a handle triggering whenever a user gets banned from a guild.
args
: Alchemy.User.t, snowflake
The user, as well as the id of the guild they were banned from get passed
to the hook.
Example
Events.on_user_ban(:cancel_ban)
def cancel_ban(user, guild) do
Client.unban_member(guild, user.id)
end