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.

OptionTypeDefaultDescription
primaryColorHexColorString#5865F2Color for .g.reply.primary()
secondaryColorHexColorString#4F545CColor for .g.reply.secondary()
successColorHexColorString#57F287Color for .g.reply.success()
errorColorHexColorString#ED4245Color for .g.reply.error()
infoColorHexColorString#5DADE2Color for .g.reply.info()
warningColorHexColorString#FEE75CColor for .g.reply.warning()
footer.textstringFooter text appended to every container
footer.iconURLstringFooter icon URL

Colors

Colors are defined as hex strings (HexColorString from discord.js):

primaryColor: "#5865F2"  // ✅
primaryColor: 0x5865F2   // ❌ use hex string, not number

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"
      }
    }
  }
})
Copyright © 2026