Skip to content
GitHub

ThemeResolvers

interface in meocord/interface Since 4.1.0

interface ThemeResolvers

Themes that depend on where a call comes from, as @MeoCord({ themeFor }) takes them, or a class implementing ThemeResolver.

Each resolver returns part of a theme, or undefined or null for none, at once or as a promise. A server's theme goes over the handler's, and a user's over the server's.

Members

guild

guild?: (
  target: GuildThemeTarget,
) =>
  ThemeOverride | null | undefined | Promise<ThemeOverride | null | undefined>

The theme for calls from a server; not asked for a call from a DM.

user

user?: (
  target: UserThemeTarget,
) =>
  ThemeOverride | null | undefined | Promise<ThemeOverride | null | undefined>

The theme for calls from a user, in a server or a DM.

See also