tether developers
Contents

Docs

Coming from Discord

What is the same, what is different, and what to check when a Discord bot is quiet on tether.

tether's API is shaped like Discord's: the same routes, field names, numeric codes, permission bits and gateway opcodes, unless there is a reason not to. An unmodified discord.py 2.7 or discord.js 14 bot runs against tether once it knows the three addresses in Getting started. This page is the list of what you will still notice.

The same

  • Routes and objects. Servers are called guilds in the API and "servers" in the app. Users, members, roles, channels, messages, reactions, pins, invites, bans, emoji, threads, polls, the audit log and application commands are Discord's, with Discord's field names, snake_case, and ids as strings.
  • Permissions. Discord's bit positions for every permission tether has, bitfields as decimal strings, and Discord's algorithm: owner, then @everyone and roles, then Administrator, then channel overwrites. A bot sees channels like a member: View Channel through @everyone, its roles and the overwrites.
  • The gateway. {op, d, s, t} frames over a WebSocket, the same opcodes, HELLO then IDENTIFY then READY then a GUILD_CREATE per server, heartbeats, RESUME, and Discord's close codes.
  • Errors. {code, message, errors} with Discord's codes (10003 Unknown Channel, 50001 Missing Access, 50013 Missing Permissions, 50035 Invalid Form Body with nested errors), and 429s with retry_after and global. tether's own codes start at 90000: see Errors.
  • Rate limit headers. X-RateLimit-*, so both libraries queue their own requests: see Rate limits.
  • Interactions. Buttons, menus and slash commands arrive as INTERACTION_CREATE, and you answer with the interaction callback and the webhook follow-up routes: Buttons and interactions, Slash commands.
  • Message formatting. Discord's markdown, mentions (<@id>, <#id>), custom emoji and timestamps (<t:unix:R>, every style) are drawn as Discord draws them.
  • Files. multipart/form-data with payload_json and files[n], as discord.File and AttachmentBuilder send them: Files.
  • Bodies are read the forgiving way. Keys tether does not know (tts, allowed_mentions, sticker_ids, an embed's proxy_icon_url…) are dropped, not refused, and null counts as "not there" wherever a field is optional. A POST with no body works whatever its Content-Type. Ids you send as JSON numbers (discord.py does in several places) are never rounded.

Different

What Discord tether
API version /api/v10 /api/v1 (the gateway accepts any v and ignores it)
Snowflake epoch 2015-01-01 2015-01-01 too, for ids made from 2026-10-24. Earlier ids count from 2026-01-01, so a library reads them as 2015-2016 dates.
Reading message text The MESSAGE_CONTENT intent The server decides: mentions, a registered prefix, or everything if the server allows it. The intent is accepted and changes nothing. Privacy for bots.
Privileged intents Approval above 100 servers Not gated. Every bit Discord defines is accepted.
Message length 2000 characters 4000 for a message you send; 2000 for an interaction reply.
Shards Many One. GET /gateway/bot says shards: 1. No compression, no ETF: plain JSON, so do not install zlib-sync or erlpack.
Adding a bot Authorization link; bots are public unless the maker switches that off Discord's link, and the bot joins with a managed role (as on Discord) holding what the link asked for, never more than the person adding it holds. Bots are private by default: only their maker can add them until they are made public.
Voice Discord's voice protocol (UDP) LiveKit. VOICE_SERVER_UPDATE carries a LiveKit address and token. @discordjs/voice and discord.py voice need swapping for a LiveKit SDK: Voice.
Pictures cdn.discordapp.com The API origin. Set the library's CDN base to <origin>/api/v1. ?size= and the extension do not convert anything; pictures are stored once and served as they are. The one exception is an animated avatar or banner (below).
Attachment links Public CDN links No public CDN. A bot is handed an absolute link signed for an hour (?ex=&is=&hm=) in every message it can read, so Attachment.read() and fetch(url) work as they are; after the hour use POST /attachments/refresh-urls.
Users by id GET /users/{id} The same: Get User, fetch_user() and users.fetch() work for any id. Public fields only (name, picture, banner, colour, bot), and at most 30 a minute and 300 an hour.
Threads Public, private, forum posts Public threads in text channels. Private threads and forum channels are 400.
What a bot may do Many things A bot cannot create servers, bots or invites, or accept invites. Those routes are for people and answer a bot 403 20001. Each route in the reference says who may call it.
Slash commands Global, guild, user installs, DMs Global and per server, in servers only. Chat input commands run from the app's / menu; user and message (context menu) commands from Apps in the right-click menu of a person or a message.
Modals Yes Yes: callback type 9, text inputs and single-choice menus (Buttons and interactions).
Activities Yes Not offered.
Webhooks Channel webhooks Only an interaction's follow-ups (/webhooks/{application.id}/{token}).
Stickers, scheduled events… Yes No. The intents exist (and are accepted) but no event depends on them.

Animated avatars and banners

Animated profile pictures and banners are free for everyone (on Discord they need Nitro). As on Discord, an animated picture's hash starts with a_ ("avatar": "a_<32 hex>", the same for banner); a still one is a plain hash. Nothing else on the user object changes. People upload a GIF, an animated WebP or an APNG; a file with one frame stays a still. tether keeps three files of an animated picture and serves them at Discord's addresses (/avatars/{user.id}/{avatar} and /banners/{user.id}/{banner}, under the CDN base):

Address You get
…/a_<hash>.gif the animation as a GIF (image/gif)
…/a_<hash>.webp?animated=true the animation as an animated WebP
…/a_<hash>, .png, .jpg, .webp (no animated=true) a still of the first frame, as WebP

Every frame is cropped the way a still is: a square for an avatar (256 pixels), 5:2 for a banner (1200 by 480; an animation with very many frames is stored smaller). An animation is at most 300 frames and 4 MiB as sent; anything bigger is refused with IMAGE_INVALID under avatar or banner. Use the still unless the picture should move: tether's own apps show the still everywhere and play the animation only on a profile or while the pointer is on the person.

Placeholders

A few fields exist because libraries read them without a default, with nothing behind them: verify_key on the application (64 zeros; tether has no HTTP interactions endpoint), locale and guild_locale on interactions (en-US), the guild settings tether has none of (verification_level, premium_tier… with a default server's values), a member's flags (0), client_status (the platform is always web), and /embed/avatars/{n}.png (a flat colour square, not Discord's artwork).

A bot whose code you will not edit

Three open-source bots (a discord.py moderation bot, a discord.py reminder bot, a discord.js trivia bot) were run with only their addresses changed: scripts/ports/ in the repository runs them and checks every feature. What it takes:

  • discord.py. Set the three addresses from Getting started in a small file that then runs the bot's own file (runpy.run_path('bot.py', run_name='__main__')). The bot's code does not change.

  • discord.js, when you build the Client. new Client({ rest: { api, version: '1', cdn } }), as in Getting started.

  • discord.js, when the bot builds its own Client and REST (a bot you start with node index.js, or one whose ShardingManager starts the shards): set the same three values once on @discordjs/rest's default options before anything is created, for example in a file loaded with NODE_OPTIONS=--require=./tether.cjs (children inherit it):

    const { DefaultRestOptions } = require('@discordjs/rest');
    DefaultRestOptions.api = 'https://app.tethr.lol/api';
    DefaultRestOptions.cdn = 'https://app.tethr.lol/api/v1';
    DefaultRestOptions.version = '1';

    Require @discordjs/rest from the bot's own node_modules, so that it is the copy discord.js uses.

  • ShardingManager with totalShards: 'auto' asks discord.com for the shard count with its own fetch, which no option can redirect: give it a number (tether has one shard).

  • Python 3.14, discord.py 2.7.1 and discord.js 14.27 are what these bots ran on.

What still differs for a ported bot

  • Ids and dates. Ids made from 2026-10-24 count from Discord's epoch (2015), so Message.created_at, User.created_at, discord.utils.snowflake_time, a date as a history bound (channel.history(after=some_datetime)) and bulk delete's two-week rule are right for them. Ids made before that day (the first servers, people and messages) count from 2026-01-01 and a library reads them as dates in 2015-2016: for those, read timestamp fields, or pass ids. Order never changes: a newer id is always a larger number. discord.py's channel.purge() deletes one message at a time when the messages are old-style ids (it works out which are young enough for bulk delete from the id).
  • Scheduled events (/remind event-style commands, Create Events) are not offered.
  • ATTACHMENT options of a slash command cannot be filled from the app yet (a bot that asks for a file as an option shows it as such but is not run; one that asks for a reply with a file works).

What tether adds

  • Rich posts with settings pieces. Components v2 with tether's own Row, setting field, On/Off switch and buttons beside a section, and roomier limits (Rich posts for bots). User, role, mentionable and channel pickers work in messages and in forms.

A library that knows nothing of tether must not break on the extras, and the two real ones do not.

  • Dispatches Discord does not have: VOICE_STATE_ERROR, PLAYER_STATE_UPDATE, GUILD_BOT_SETTINGS_UPDATE, THEATRE_*, POST_STATE_UPDATE, and the like. discord.py logs them at debug level ("Unknown event") and carries on; discord.js ignores a packet it has no handler for. Listen for the ones you want over the raw gateway (on_socket_raw_receive, client.ws.on('packet')). VOICE_STATE_ERROR is the one a music bot should read: a refused voice join fails at once instead of timing out.
  • Fields beside Discord's, ignored the same way: player on a user or application, bot_public, thread on a message, server_post, and so on. The reference marks every tether-only thing.
  • The player's interactions. The player's buttons are ordinary component interactions with a player: {channel_id} field and no message; its "add a song" form is a modal submit and its search is an autocomplete. The music player has the details, including why a commands.Bot with a command tree logs "Ignoring exception in command tree" for each keystroke of the search (use discord.Client, or override CommandTree.on_error).

When something is quiet

Nothing tells a bot why a Discord-style thing is quiet, so here is what to check.

What you see Why What to do
Messages arrive with content: "" (and no embeds or attachments) The server has not given the bot the text: it was not mentioned, the message did not start with its prefix, and full content is off. Ask someone with Manage Server to register your prefix or turn full content on (Server settings › Bots), or set default_prefix before the bot is added. GET /guilds/{guild.id}/bots/{bot.id}/settings shows the rule.
No events from a channel A bot sees channels like a member: View Channel through @everyone, its roles and the overwrites. Give the bot a role (a bot starts with the permissions its add link asked for), or open the channel to it.
The gateway closes with 4004 Wrong, reset or revoked token. Reset Bot Token and use the new one. The old one is dead at once.
The gateway closes with 4013 The intents value is not a bitfield (negative or fractional). Undefined bits are ignored, never a reason to refuse. Send a non-negative integer.
403 code 20001 A route for people (creating servers, bots, invites…). Use a person's session for it, or find the Discord-shaped route a bot may use.
403 code 20002 A route for bots (GET /applications/@me, application commands) called with a person's token. Use the bot's token.
404 10013 on GET /users/{id} No account has that id (or it is a reserved system author). Check the id; a deleted or never-made account looks like this.
"The bot didn't respond" (504, 90210) for the person The first answer to an interaction is due in 3 seconds. Answer with the callback at once (defer() in discord.py is a callback); do the slow work after. A late answer is 404 10062.
403 90220 when adding a bot The bot is private and you are not its maker. Make it public in the portal ("Anyone can add it").
Pictures do not load from .png addresses The library builds them from Discord's CDN. Set the library's CDN base to <origin>/api/v1.
attachments[].url stopped downloading Its signature (an hour) has lapsed, or the message came from a place that gives the path (an interaction's follow-up). Use Refresh Attachment URLs, or join the path to the origin and send Authorization: Bot <token>.
GATEWAY_URL is the web address In a local dev server it is the web origin; resume_gateway_url is the same value. Connect to the server's own port, or set GATEWAY_URL (self-hosting).
429 on one route, others fine That route's bucket ran dry. tether's buckets are its own. Read the headers; both libraries do. See Rate limits.

The server tests that pin all of this are in the repository (apps/server/test/discord-parity.test.ts and parity-*.test.ts); scripts/discordpy-smoke and scripts/discordjs-smoke run unmodified libraries against a local server.