-
Notifications
You must be signed in to change notification settings - Fork 0
UtilService
github-actions[bot] edited this page Sep 30, 2024
·
6 revisions
service class for general utilities such as
|
|
JS | |
const { Client } = require('noscord.js');
const client = new Client();
client.import("util");
client.on("ready", async () =>
util.random.int(1, 5); // 2
util.random.choice([ "a", "b", "c"]); // "c"
await util.sleep("1s");
util.parse("1m"); // 60
util.parseMs("1m"); // 60000
util.colors.blurple; // "#7289da"
util.genCode(9); // "ij7elwolz"
let ts = new Timestamp();
console.log(ts.relative); // "<t:1543392060:R>"
}); |
π Client |
π AddonService |
π AttachmentService |
π ChannelService |
π CommandService |
π ComponentService |
π ErrorService |
π EventService |
π ExpressionService |
π GuildService |
π LogService |
π MessageService |
π PermissionService |
π RoleService |
π StorageService |
π TypeService |
π UserService |
π UtilService |
π VoiceService |