discord.py-self
A Python wrapper for the Discord user API
What it is and what it does
discord.py-self is an async Python wrapper for Discord's user account API—the undocumented interface that powers the Discord client itself rather than bot accounts. It extends the original discord.py library with methods to automate user account actions: reading message history, managing relationships, handling billing and subscriptions, responding to interactions, and controlling sessions. The library is intentionally designed to avoid detection by Discord's systems.
The package depends on aiohttp for HTTP requests, curl_cffi for advanced HTTP handling, tzlocal for timezone support, discord_protos for protobuf message definitions, and audioop-lts for audio operations. It targets modern Python (3.10–3.14) and maintains active development. However, the description itself carries an explicit warning: automating user accounts violates Discord's Terms of Service, and the authors cannot recommend its use.
Use it for:
- Build a self-bot that responds to commands in your own Discord messages for personal automation.
- Programmatically manage user account settings, relationships, and billing information.
- Automate message reading and interaction handling for personal Discord workflows.
- Interact with Discord's slash commands and button interactions from a user account.
- Manage multiple user account sessions and read states programmatically.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
An async Python wrapper for Discord's user account API, enabling programmatic control of user accounts with support for sessions, relationships, billing, and interactions.
No. While the library is technically mature and well-maintained, the description explicitly warns that automating user accounts violates Discord's Terms of Service and the authors cannot recommend its use. Installing and running this code exposes you to account suspension or permanent ban. Use only if you fully understand and accept the ToS violation and the risk of account loss.
Install
discord-py-self on PyPI
pip
pip install discord-py-selfuv
uv add discord-py-selfpoetry
poetry add discord-py-selfInstalling discord.py-self
Before you install
Low install friction with a pure-wheel distribution. Active maintenance with recent commits and a stable release history since 2021. Requires Python 3.10 or higher.
License in practice
MIT license permits commercial and private use with minimal restrictions; attribution required.
Quickstart
pip install discord.py-self
import discord
client = discord.Client()
client.run('user_token')
Python 3.10 or higher required. Automating user accounts violates Discord's Terms of Service.
Verify before relying
- Whether the library successfully evades Discord's automation detection in practice.
- Current status of Discord's enforcement against user account automation and whether this library remains functional.
- Whether all user-account-specific API features (billing, experiments, protobuf settings) are fully implemented and stable.
Package facts
| License | The MIT License (MIT) Copyright (c) 2015-present Rapptz Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the… (full text in the JSON record) (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 5 — aiohttp, curl_cffi, tzlocal, discord_protos, audioop-lts |
| Maintenance | actively maintained — 208 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 115,297/month — #12,260 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: discord_py_self-2.1.0-py3-none-any.whl
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
discord.pydiscord.py is an async-ready Python wrapper for…
permissive · top 5,000 on PyPI
discordA Python API wrapper for Discord that provides…
unclear · top 15,000 on PyPI
hikariHikari is an async Discord bot framework for…
permissive · top 15,000 on PyPI
py-cordpy-cord is an async Python wrapper for the…
permissive · top 15,000 on PyPI
nextcordNextcord is an async-ready Python wrapper for…
permissive · top 15,000 on PyPI
allianceauth-discordbotA Discord bot framework for Alliance Auth that…
permissive · top 15,000 on PyPI
vk-apiPython wrapper for the VKontakte (VK) social…
permissive · top 15,000 on PyPI
qq-botpyA Python framework for building QQ chat bots…
permissive · top 15,000 on PyPI
discord-webhookSend messages to Discord channels via webhooks,…
permissive · top 5,000 on PyPI
pyroforkPyrofork is an asynchronous Python framework…
copyleft · top 15,000 on PyPI