2022-02-25 22:00:39 +00:00
|
|
|
--- @meta
|
|
|
|
|
|
|
|
local bait = {}
|
|
|
|
|
2023-12-26 03:08:29 +00:00
|
|
|
--- Catches an event. This function can be used to act on events.
|
|
|
|
---
|
|
|
|
---
|
2022-02-25 22:15:49 +00:00
|
|
|
function bait.catch(name, cb) end
|
2022-02-25 22:00:39 +00:00
|
|
|
|
2023-12-26 03:08:29 +00:00
|
|
|
--- Catches an event, but only once. This will remove the hook immediately after it runs for the first time.
|
2022-02-25 22:15:49 +00:00
|
|
|
function bait.catchOnce(name, cb) end
|
2022-02-25 22:00:39 +00:00
|
|
|
|
2023-12-26 03:08:29 +00:00
|
|
|
--- Returns a table of functions that are hooked on an event with the corresponding `name`.
|
2022-12-02 00:05:24 +00:00
|
|
|
function bait.hooks(name) end
|
2022-10-11 21:43:22 +00:00
|
|
|
|
2023-02-07 22:19:24 +00:00
|
|
|
--- Removes the `catcher` for the event with `name`.
|
2022-08-17 22:01:55 +00:00
|
|
|
--- For this to work, `catcher` has to be the same function used to catch
|
|
|
|
--- an event, like one saved to a variable.
|
2023-12-26 03:08:29 +00:00
|
|
|
---
|
|
|
|
---
|
2022-12-02 00:05:24 +00:00
|
|
|
function bait.release(name, catcher) end
|
2022-08-17 22:01:55 +00:00
|
|
|
|
2023-12-26 03:08:29 +00:00
|
|
|
--- Throws a hook with `name` with the provided `args`.
|
|
|
|
---
|
|
|
|
---
|
2022-12-15 04:00:54 +00:00
|
|
|
function bait.throw(name, ...args) end
|
2022-02-25 22:00:39 +00:00
|
|
|
|
|
|
|
return bait
|