Configuration

Configuration

This page documents every section of config.yml and its corresponding environment variable overrides.

Setup

  1. Copy the template:

    cp config.example.yml config.yml
  2. Edit config.yml with your values. Sensitive values like tokens should use environment variable interpolation:

    bot:
      TOKEN: ${TOKEN}
  3. Create a .env file for secrets:

    TOKEN=your_discord_bot_token_here

Values in .env override the corresponding ${VAR} placeholders in config.yml.


bot Section

bot:
  TOKEN: ${TOKEN}                    # Bot token (use .env override)
  EMBED_COLOR_MAIN: "#F4E0C7"       # Primary embed color (hex)
  EMBED_COLOR_SECOND: "#2F3136"     # Secondary embed color
  OWNER_ID: "YOUR_DISCORD_USER_ID"  # Bot owner's Discord user ID
  ADMIN: ["YOUR_DISCORD_USER_ID"]   # Admin user IDs (array)
  DEFAULT_VOLUME: 80                # Default playback volume (1-100)
  LANGUAGE: "en"                    # Default language code
  DEBUG_MODE: false                 # Enable verbose logging
  SHARDING_SYSTEM:
    shardsPerClusters: 1            # Shards per cluster
    totalClusters: 1                # Total clusters
  BOT_ACTIVITY1: "your heart"       # Status rotation text 1
  BOT_ACTIVITY2: "your dream"       # Status rotation text 2
  BOT_ACTIVITY3: "your life"        # Status rotation text 3
  BOT_ACTIVITY_TYPE: 2             # 0=Playing, 1=Streaming, 2=Listening, 3=Watching, 4=Custom, 5=Competing
  BOT_STATUS: "idle"               # online, idle, dnd, invisible
KeyTypeDefaultDescription
TOKENstring-Discord bot token. Use ${TOKEN} and set in .env
EMBED_COLOR_MAINstring#F4E0C7Primary hex color for embeds
EMBED_COLOR_SECONDstring#2F3136Secondary hex color for embeds
OWNER_IDstring-Discord user ID of the bot owner. Always bypasses all access checks
ADMINstring[][]Discord user IDs with admin privileges. Bypass all access checks
DEFAULT_VOLUMEnumber80Default playback volume (1-100)
LANGUAGEstringenDefault language code. See available codes below
DEBUG_MODEbooleanfalseEnables debug-level logging
SHARDING_SYSTEM.shardsPerClustersnumber1Shards per cluster
SHARDING_SYSTEM.totalClustersnumber1Total clusters to spawn
BOT_ACTIVITY1/2/3string-Rotating status text
BOT_ACTIVITY_TYPEnumber2Discord activity type
BOT_STATUSstringidleDiscord status

Available Languages

ar, cs, de, en, es, fr, he, hi, id, it, ja, ko, nl, pl, pt, ru, th, tr, uk, vi, zh-CN, zh-TW


lavalink Section

lavalink:
  SPOTIFY:
    enable: true
    id: "your_spotify_client_id"
    secret: "your_spotify_client_secret"
    redirectUri: "https://your-domain.com/auth/spotify/callback"
 
  NODES:
    - host: "localhost"
      port: 2333
      name: "Main"
      auth: "youshallnotpass"
      secure: false
      driver: "lavalink/v4"
KeyTypeDescription
SPOTIFY.enablebooleanEnable Spotify integration
SPOTIFY.idstringSpotify Client ID (from Spotify Dashboard (opens in a new tab))
SPOTIFY.secretstringSpotify Client Secret
SPOTIFY.redirectUristringRedirect URI for Spotify OAuth (dashboard integration)
NODES[].hoststringLavalink server hostname
NODES[].portnumberLavalink server port (default: 2333)
NODES[].namestringNode display name
NODES[].authstringLavalink password (must match application.yml)
NODES[].securebooleanUse SSL/TLS for the connection
NODES[].driverstringMust be lavalink/v4

You can add multiple nodes for redundancy. The bot distributes players across available nodes.

A reference Lavalink application.yml is provided at backend/additional-file/application.yml. This file can be reconfigured to suit your needs (ports, passwords, plugins, source settings, etc.).


features.DATABASE Section

Configure your database driver. Supported drivers: mongodb, mysql, postgres, json.

Recommendation: Use json for development. For production, use postgres (recommended) or mysql.

PostgreSQL

features:
  DATABASE:
    driver: "postgres" # Note: mongodb, mysql, json, postgres
    config:
      host: "localhost"
      user: "me"
      password: "secret"
      database: "my_db"

MySQL

features:
  DATABASE:
    driver: "mysql" # Note: mongodb, mysql, json, postgres
    config:
      host: "localhost"
      port: 3306
      user: "me"
      password: "secret"
      database: "my_db"

MongoDB

features:
  DATABASE:
    driver: "mongodb" # Note: mongodb, mysql, json, postgres
    config:
      uri: "mongodb://127.0.0.1:27017/mewwme"

JSON (Development Only)

features:
  DATABASE:
    driver: "json" # mongodb, mysql, json, postgres
    config: { path: "./mewwme.database.json" }

Additional Database Settings

features:
  DATABASE:
    ClearCache: "*/60 * * * * *"   # Cache clear schedule (cron)
KeyTypeDescription
ClearCachestringCron expression for clearing the in-memory cache
driverstringDatabase driver: json, mongodb, mysql, postgres
config.uristringMongoDB connection URI
config.hoststringMySQL/PostgreSQL hostname
config.userstringMySQL/PostgreSQL username
config.passwordstringMySQL/PostgreSQL password
config.databasestringMySQL/PostgreSQL database name
config.portnumberMySQL port (default: 3306)
config.pathstringJSON file path (default: ./mewwme.database.json)

features.RestAPI Section

features:
  RestAPI:
    auth: "your_secret_token"
    enable: true
    port: 2555
    whitelist: ["meww.me"]
    SessionSecret: "random_hex_string"
    DiscordClientId: "..."
    DiscordClientSecret: "..."
    DiscordRedirectUri: "http://localhost:2555/auth/discord/callback"
    DashboardUrl: "http://localhost:3000"
KeyTypeDescription
authstringInternal API authentication token. Used by WebSocket bridge and REST API
enablebooleanEnable/disable the REST API server
portnumberAPI server port (default: 2555)
whiteliststring[]Allowed domains. Empty array = allow all
SessionSecretstringSession encryption key. Override with SESSION_SECRET env var
DiscordClientIdstringDiscord application Client ID. Override with DISCORD_CLIENT_ID
DiscordClientSecretstringDiscord application Client Secret. Override with DISCORD_CLIENT_SECRET
DiscordRedirectUristringDiscord OAuth2 redirect URI. Override with DISCORD_REDIRECT_URI
DashboardUrlstringFrontend URL for CORS and redirects. Override with FRONTEND_URL

features.WebServer Section

features:
  WebServer:
    enable: true
    Port: 2444
    BaseUrl: "https://ws.example.com"
    TOPGG_VOTELOGS:
      Enable: true
      TopGgWebhookSecret: "..."
      LogVoteChannelID: "..."
    LAST_FM_SCROBBLED:
      Enable: true
      ApiKey: "..."
      Secret: "..."
      Callback: "https://ws.example.com/lastfm"
      scheduleScrobble: 60000
KeyTypeDescription
enablebooleanEnable/disable the Express webhook server
PortnumberExpress server port (default: 2444)
BaseUrlstringPublic base URL for this server
TOPGG_VOTELOGS.EnablebooleanEnable Top.gg vote logging
TOPGG_VOTELOGS.TopGgWebhookSecretstringTop.gg webhook authorization secret
TOPGG_VOTELOGS.LogVoteChannelIDstringDiscord channel ID for vote log messages
LAST_FM_SCROBBLED.EnablebooleanEnable Last.fm scrobbling
LAST_FM_SCROBBLED.ApiKeystringLast.fm API key
LAST_FM_SCROBBLED.SecretstringLast.fm API secret
LAST_FM_SCROBBLED.CallbackstringLast.fm OAuth callback URL
LAST_FM_SCROBBLED.scheduleScrobblenumberScrobble processing interval in milliseconds

Patreon Section

Patreon:
  Enable: true
  AccessToken: "..."
  CampaignId: "..."
  MinTierPrice: 500
KeyTypeDescription
EnablebooleanEnable Patreon integration
AccessTokenstringPatreon Creator Access Token
CampaignIdstringPatreon campaign ID (use scripts/getCampignId.js to find it)
MinTierPricenumberMinimum tier price in cents to qualify for premium

KoFi Section

KoFi:
  Enable: true
  VerificationToken: "..."
KeyTypeDescription
EnablebooleanEnable Ko-fi integration
VerificationTokenstringKo-fi webhook verification token

PremiumRole Section

PremiumRole:
  Enable: true
  GuildId: "..."
  RoleId: "..."
KeyTypeDescription
EnablebooleanEnable premium via Discord role
GuildIdstringThe guild where the premium role exists
RoleIdstringThe role ID that grants premium status

logchannel Section

logchannel:
  GuildJoinChannelId: "..."
  GuildLeaveChannelId: "..."
  ErrorChannelId: "..."

Channel IDs for various bot log outputs. Set to empty string to disable specific log channels.


GeminiAiChat Section

GeminiAiChat:
  Enable: true
  ApiKeys:
    - "GEMINI_API_KEY_1"
    - "GEMINI_API_KEY_2"
  Models:
    - "gemini-2.5-flash"
    - "gemini-2.0-flash"
KeyTypeDescription
EnablebooleanEnable AI Chat feature
ApiKeysstring[]Google Gemini API keys (auto-rotate on quota errors)
Modelsstring[]Ordered model list (falls back to next on failure)

Get API keys from Google AI Studio (opens in a new tab).


COMMANDS_ACCESS Section

COMMANDS_ACCESS:
  MUSIC:
    Play: ["Member"]
    MusicTrivia: ["Member"]
  FILTER:
    Nightcore: ["Member"]
  GAMES:
    2048: ["Member"]
  # ...

Controls permission levels per command. Available levels: Owner, Admin, Manager, Premium, Voter, Member.


DASHBOARD_ACCESS Section

DASHBOARD_ACCESS:
  Filters: ["Voter"]
  TwentyFourSeven: ["Voter"]
  Autoplay: ["Voter"]
  LastFm: ["Voter"]
  Spotify: ["Voter"]
  SongRequest: ["Voter"]
  Language: ["Voter"]
  StatusVoiceChannel: ["Voter"]
  Prefix: ["Voter"]
  DjRole: ["Voter"]
  ControlButton: ["Voter"]
  Playlist: ["Voter"]
  AiChat: ["Member"]

Controls access levels for dashboard features. When a user lacks access, the frontend renders a blurred overlay with an action button (vote link or premium info).

LevelBehavior
MemberNo restriction
VoterMust have voted on Top.gg. Premium users bypass
PremiumPremium users only. Owner/Admin bypass
ManagerRequires Manage Server permission
AdminBot admin only
OwnerBot owner only

features.PLAY_COMMAND_ENGINE Section

features:
  PLAY_COMMAND_ENGINE:
    default: "ytsearch"
    sources:
      - "ytsearch"
      - "scsearch"
      - "spsearch"

Controls the default search engine and available sources for the /play command.


features.AUTOFIX_LAVALINK Section

features:
  AUTOFIX_LAVALINK:
    enable: true
    retryCount: 10
    retryTimeout: 3000

Enables automatic Lavalink node recovery when nodes go offline.


features.MESSAGE_CONTENT Section

features:
  MESSAGE_CONTENT:
    enable: true
    prefix: "!"

Enables prefix-based commands in addition to slash commands.


emojis Section

emojis:
  play: "▶️"
  pause: "⏸️"
  skip: "⏭️"
  stop: "⏹️"
  loop: "🔁"
  # ...

Custom emoji configuration for player buttons and menus. Use Unicode emoji or custom Discord emoji IDs.


WELCOMER_EVENTS Section

WELCOMER_EVENTS:
  enable: true
  welcomeChannel: "..."
  leaveChannel: "..."

Configures the canvas-based welcome/leave image system.


Environment Variables Summary

VariableConfig PathDescription
TOKENbot.TOKENDiscord bot token
SESSION_SECRETfeatures.RestAPI.SessionSecretSession encryption key
DISCORD_CLIENT_IDfeatures.RestAPI.DiscordClientIdDiscord OAuth2 Client ID
DISCORD_CLIENT_SECRETfeatures.RestAPI.DiscordClientSecretDiscord OAuth2 Client Secret
DISCORD_REDIRECT_URIfeatures.RestAPI.DiscordRedirectUriDiscord OAuth2 redirect URI
FRONTEND_URLfeatures.RestAPI.DashboardUrlFrontend URL for CORS
NODE_ENV-production enables secure cookies and trust proxy