Using the utilities is quite easy. All you have to do is import one namespace and you have all of the functionality you could ever wish for.
import { QuackJSUtils } from '@n-f9/quack.js'
import { QuackJSUtils } from '@n-f9/quack.js'
export default (Quack) => {
Quack.CreateTrigger({
name: 'color',
trigger: /color: /g,
execute(client, message) {
const color = message.content.replace('color: ', '')
try {
const conversion = QuackJSUtils.Color(color)
message.reply(
QuackJSUtils.Discord.Embed({
embeds: [
{
title: color,
color: conversion,
description: '#' + conversion.toString(16),
},
],
}),
)
} catch (error) {
message.reply(
QuackJSUtils.Discord.Embed({
embeds: [
{
title: 'Ahh! An Error!',
},
],
}),
)
}
},
})
}