Skip to main content

aiodc

discord.py extensions: identify as a different Discord client, pull live client build numbers, and drive the display name font/effect API.

Python 3.9+. Depends on discord.py (master) and curl-cffi.

pip install aiodc

Client identity

Importing aiodc patches DiscordWebSocket.identify, so your bot tells the gateway it's an iPhone by default. Pick another client before bot.run():

import aiodc

aiodc.mode("android")
Mode Identifies as
"vr" Oculus VR client
"ios" iPhone client
"android" Android client
"desktop" Windows desktop client
"web" Chrome browser

An unknown name raises ValueError. The patch sticks for every later IDENTIFY, reconnects included.

Build numbers

build(mode) reports what Discord's clients currently run:

from aiodc import builds

await builds("web")      # "400123", scraped from the login page's JS bundles
await builds("ios")      # "341.0", from Apple's App Store lookup API
await builds("android")  # "341013", scraped from the apkcombo listing

# android can also give you the release version instead of the raw number
await buildns("android", version=True)             # "341.13"
await builds("android", number=True, version=True)  # {"number": "341013", "version": "341.13"}

Requests go through curl_cffi with a Chrome TLS fingerprint, so Discord sees a real browser. Two of the three sources are scraped pages; when markup changes or a request fails you get None back rather than an exception. Only a bad mode name raises.

Display name fonts

Members can render their display name in custom fonts, effects, and colors per guild. This module calls that endpoint directly:

from aiodc import Color, Effect, Font, apply, preset, reset

# any combo works: 1 to 5 colors, ints, or "#ff00ff"-style hex strings
await apply(
    guild,
    Font.ORBITRON,
    Effect.PRISM,
    ["#ff00ff", Color.GREEN, 65535, "#ffffff", 16777215],
)

# or use a shipped preset
await preset(guild, "orbitron-prism-rainbow")

# back to plain text
await reset(guild)

Input gets checked before anything hits the API: font IDs 1-16, effect IDs 1-8, gradient wants exactly 2 colors, prism 5, gummy 4. Bad input raises ValidationError and no request is sent.

Your bot needs to be in the guild and allowed to edit its own member profile there.

Eleven presets come bundled under aiodc.PRESETS, names like sinistre-neon-white and playpen-gummy-pink-purple-cyan-gold. List them yourself:

from aiodc import PRESETS

print(*PRESETS, sep="\n")

Also exported: hex_to_int, int_to_hex, validate_hex, validate_color, NameStyleError.

Metadata

Release files for aiodc 1.0.32

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aiodc 1.0.32
File Size Uploaded
aiodc-1.0.32.tar.gz 20.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aiodc 1.0.32
File Interpreter ABI Platform
aiodc-1.0.32-py3-none-any.whl Python 3 none any Details

Total release size: 42.3 kB

Release files / aiodc-1.0.32.tar.gz

Download URL aiodc-1.0.32.tar.gz
Size 20.8 kB
Tags Source
SHA-256 checksum
How to use checksums
d86c92d09ca59e3e3d1dd8caa54366afb2c600720cdf189739e28d31465ac319
BLAKE2b-256 checksum
How to use checksums
c230902a397f2a9526fded75aaff77cad64e724aca3e92935a858f96ef7b90fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / aiodc-1.0.32-py3-none-any.whl

Download URL aiodc-1.0.32-py3-none-any.whl
Size 21.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3f89736555595ca038f98d53c1aeeb67f2b34e7e5e020a91c4c9e88dc82b2134
BLAKE2b-256 checksum
How to use checksums
5f627ec75f809e8b7d3f4b19ae8be9514c9ef50ffa474a3fa48b51dcfadd435c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

1.0.33

2 release files

This release

1.0.32 This release

2 release files

1.0.31

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page