From 8fe683fff9e51c9796e419553d0b6102c5730663 Mon Sep 17 00:00:00 2001 From: TorchedSammy Date: Thu, 30 Nov 2023 22:31:17 +0000 Subject: [PATCH] deploy: 2363e6ff2f2b33a3b3b8584f221c007f4229eff3 --- .../doc-improvements/docs/api/bait/index.html | 10 +++++++--- versions/doc-improvements/docs/hooks/index.html | 15 ++++----------- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/versions/doc-improvements/docs/api/bait/index.html b/versions/doc-improvements/docs/api/bait/index.html index 6e3048a..dc9b52c 100644 --- a/versions/doc-improvements/docs/api/bait/index.html +++ b/versions/doc-improvements/docs/api/bait/index.html @@ -16,9 +16,13 @@ Consider this part of it:

end)
 

What this does is, whenever the command.exit event is thrown, this function will set the user prompt.

Functions -

catch(name, cb)Catches a hook with name. Runs the cb when it is thrown
catchOnce(name, cb)Same as catch, but only runs the cb once and then removes the hook
hooks(name) -> tableReturns a table with hooks (callback functions) on the event with name.
release(name, catcher)Removes the catcher for the event with name.
throw(name, …args)Throws a hook with name with the provided args

bait.catch(name, cb) -

Catches a hook with name. Runs the cb when it is thrown

Parameters -

string name
ummm

function cb
?


bait.catchOnce(name, cb) +

catch(name, cb)Catches a hook. This function is used to act on hooks/events.
catchOnce(name, cb)Same as catch, but only runs the cb once and then removes the hook
hooks(name) -> tableReturns a table with hooks (callback functions) on the event with name.
release(name, catcher)Removes the catcher for the event with name.
throw(name, …args)Throws a hook with name with the provided args

bait.catch(name, cb) +

Catches a hook. This function is used to act on hooks/events.

Parameters +

string name
The name of the hook.

function cb
The function that will be called when the hook is thrown.

Example +
bait.catch('hilbish.exit', function()
+	print 'Goodbye Hilbish!'
+end)
+

bait.catchOnce(name, cb)

Same as catch, but only runs the cb once and then removes the hook

Parameters

This function has no parameters.


bait.hooks(name) -> table

Returns a table with hooks (callback functions) on the event with name.

Parameters diff --git a/versions/doc-improvements/docs/hooks/index.html b/versions/doc-improvements/docs/hooks/index.html index d5e2ddf..bc5ac8d 100644 --- a/versions/doc-improvements/docs/hooks/index.html +++ b/versions/doc-improvements/docs/hooks/index.html @@ -1,13 +1,6 @@ Hooks — Hilbish -
\ No newline at end of file