@lunibee/utils
The @lunibee/utils package contains small, dependency-free helpers used throughout Lunibee.
Installation
Section titled “Installation”bun add @lunibee/utilsimport { sleep } from "@lunibee/utils";
await sleep(1000);Useful for simple delays, retry loops, cooldowns, and test code.
Random integers
Section titled “Random integers”import { randomInt } from "@lunibee/utils";
const diceRoll = randomInt(1, 6);The range is inclusive.
Snowflakes
Section titled “Snowflakes”import { isSnowflake } from "@lunibee/utils";
isSnowflake("123456789012345678"); // trueisSnowflake("abc"); // falseUse isSnowflake() when validating user-supplied Discord IDs before sending them to an API operation.
Why these helpers are separate
Section titled “Why these helpers are separate”Utilities are intentionally independent of the Discord client. You can use them in commands, scripts, workers, tests, or other parts of your application without creating a Lunibee client.