ChannelsDiscord

Discord

Setup

  1. Go to the Discord Developer Portal and create a New Application. Give it a unique name.
  2. In the sidebar, select Installation and set the Default Install Link to None.
  3. Go to the Bot tab:
    • Untoggle Public Bot (so only you can invite it).
    • Under Privileged Gateway Intents, enable Presence Intent, Server Members Intent, and Message Content Intent.
    • Click Reset Token, confirm, and copy your token immediately. Save this token securely as you won’t be able to see it again!
  4. Go to OAuth2URL Generator:
    • Select the bot scope.
    • Under Bot Permissions, check Send Messages and Read Message History.
  5. Copy the generated URL at the bottom and paste it into your browser to invite the bot to your server.

Configuration

Add the bot token to ~/.kyber/.env:

KYBER_CHANNELS__DISCORD__TOKEN=YOUR_BOT_TOKEN

Then enable and configure in ~/.kyber/config.json:

{
  "channels": {
    "discord": {
      "enabled": true,
      "allowFrom": ["YOUR_USER_ID"],
      "allowGuilds": [],
      "allowChannels": [],
      "requireMentionInGuilds": true,
      "maxAttachmentMb": 20,
      "typingIndicator": true
    }
  }
}

Fields

FieldTypeDefaultDescription
enabledboolfalseEnable the Discord channel
allowFromarray[]User IDs or usernames allowed to interact
allowGuildsarray[]Server (guild) IDs allowed
allowChannelsarray[]Channel IDs allowed
requireMentionInGuildsbooltrueOnly respond in servers when @mentioned or replied to
maxAttachmentMbnumber20Max attachment size to download (MB)
typingIndicatorbooltrueShow “typing…” while processing

The bot token is stored in ~/.kyber/.env, not in config.json.

Finding Guild, User, and Channel IDs

To configure your bot’s allowed lists, you will need the IDs for your server (guild), users, and channels.

  1. Enable Developer Mode:

    • Go to User Settings (cog icon) → Advanced.
    • Toggle Developer Mode to ON.
  2. Copy ID:

    • User ID: Right-click on a user’s avatar or name and select Copy User ID.
    • Server (Guild) ID: Right-click on the server icon in the left sidebar and select Copy Server ID.
    • Channel ID: Right-click on a channel name in the server list and select Copy Channel ID.

Guild behavior

With requireMentionInGuilds: true (default), the bot only responds in servers when you @mention it or reply to one of its messages. In DMs, it always responds.

Set to false if you want the bot to respond to every message in allowed channels.