Alchemy.Events.disable

You're seeing just the function disable, go back to Alchemy.Events module for more information.
Link to this function

disable(module, function)

Specs

disable(atom(), atom()) :: :ok

Unhooks a function from the event handler.

If you want to unhook all the functions in a module, see Events.unload/1. Because you can have multiple hooks with the same name, this function takes both the module and the function name.

Examples

defmodule Annoying do
  use Alchemy.Events

  Events.on_message(:inspect)
  def inspect(message), do: IO.inspect message.content
end

This function is annoying us, so we can easily disable it:

Events.disable(Annoying, :inspect)

If we want to turn it back on, we can of course do

use Annoying