API Reference
defineGlyriaConfig
Configure your glyria.js bot globally.
Overview
defineGlyriaConfig is a typed helper to define your bot's global configuration in glyria.config.ts at the root of your project.
// glyria.config.ts
export default defineGlyriaConfig({
theme: {
embedV2: {
primaryColor: "#5865F2",
successColor: "#57F287",
errorColor: "#ED4245",
footer: {
text: "My Bot • v1.0",
}
}
}
})
defineGlyriaConfig is available globally — no import needed.glyria.config.ts is hot reloaded in dev mode — no restart needed when you update your config.GlyriaConfig
theme.embedV2
Global theme applied automatically to all embeds built with EmbedV2Builder and createReplyableContext.
| Option | Type | Default | Description |
|---|---|---|---|
primaryColor | HexColorString | #5865F2 | Color for .g.reply.primary() |
secondaryColor | HexColorString | #4F545C | Color for .g.reply.secondary() |
successColor | HexColorString | #57F287 | Color for .g.reply.success() |
errorColor | HexColorString | #ED4245 | Color for .g.reply.error() |
infoColor | HexColorString | #5DADE2 | Color for .g.reply.info() |
warningColor | HexColorString | #FEE75C | Color for .g.reply.warning() |
footer.text | string | — | Footer text appended to every container |
footer.iconURL | string | — | Footer icon URL |
Colors
Colors are defined as hex strings (HexColorString from discord.js):
primaryColor: "#5865F2" // ✅
primaryColor: 0x5865F2 // ❌ use hex string, not number
Footer
When footer.text is set, it is automatically appended to every ContainerBuilder when .end() is called — no extra code needed in your commands.
theme: {
embedV2: {
footer: {
text: "My Bot • v1.0",
iconURL: "https://example.com/icon.png"
}
}
}
Full example
// glyria.config.ts
export default defineGlyriaConfig({
theme: {
embedV2: {
primaryColor: "#7289DA",
secondaryColor: "#747F8D",
successColor: "#43B581",
errorColor: "#F04747",
warningColor: "#FAA61A",
infoColor: "#00B0F4",
footer: {
text: "My Bot • v1.0",
iconURL: "https://example.com/icon.png"
}
}
}
})

