2023-11-12 02:28:18 +00:00
|
|
|
---
|
|
|
|
title: Hooks
|
|
|
|
description:
|
|
|
|
layout: doc
|
|
|
|
weight: -50
|
|
|
|
menu:
|
|
|
|
docs
|
|
|
|
---
|
|
|
|
|
2022-03-06 16:04:28 +00:00
|
|
|
Here is a list of bait hooks that are thrown by Hilbish. If a hook is related
|
|
|
|
to a command, it will have the `command` scope, as example.
|
2021-11-22 21:36:32 +00:00
|
|
|
|
|
|
|
Here is the format for a doc for a hook:
|
2023-11-12 02:28:18 +00:00
|
|
|
+ {hook name} -> args > description
|
2021-11-22 21:36:32 +00:00
|
|
|
|
2023-11-12 02:28:18 +00:00
|
|
|
`{args}` just means the arguments of the hook. If a hook doc has the format
|
2021-11-22 21:36:32 +00:00
|
|
|
of `arg...`, it means the hook can take/recieve any number of `arg`.
|
2022-10-11 21:41:13 +00:00
|
|
|
|
|
|
|
+ error -> eventName, handler, err > Emitted when there is an error in
|
|
|
|
an event handler. The `eventName` is the name of the event the handler
|
|
|
|
is for, the `handler` is the callback function, and `err` is the error
|
|
|
|
message.
|