{"id":23545,"library":"discord-py-self","title":"discord-py-self","description":"A Python wrapper for the Discord user (self-bot) API, allowing automation of user accounts. Version 2.1.0 supports Python >=3.10. This library is not officially supported by Discord and is against Discord's Terms of Service, often leading to account bans. It uses a similar API to discord.py but for user accounts.","status":"active","version":"2.1.0","language":"python","source_language":"en","source_url":"https://github.com/dolfies/discord.py-self","tags":["discord","self-bot","user-api","wrapper"],"install":[{"cmd":"pip install discord-py-self","lang":"bash","label":"Install via pip"}],"dependencies":[],"imports":[{"note":"Common mistake: using wrong package name.","wrong":"from discord_self import Client","symbol":"Client","correct":"from discord import Client"},{"note":"Correct import is from discord.ext, not discord.ext.commands directly.","wrong":"from discord.ext.commands import Bot","symbol":"commands.Bot","correct":"from discord.ext import commands"}],"quickstart":{"code":"import discord\nfrom discord.ext import commands\n\nintents = discord.Intents.default()\nintents.message_content = True\nbot = commands.Bot(command_prefix='!', self_bot=True, intents=intents)\n\n@bot.event\nasync def on_ready():\n    print(f'Logged in as {bot.user}')\n\nbot.run(os.environ.get('TOKEN', ''))","lang":"python","description":"Minimal self-bot using commands.Bot with self_bot=True and message content intents."},"warnings":[{"fix":"Add intents=discord.Intents.default() (or custom) when creating Client or Bot.","message":"In version 2.0+, Intents are required and must be passed explicitly. Old code without intents will fail with a TypeError.","severity":"breaking","affected_versions":">=2.0"},{"fix":"Use bot.run(token) or await bot.start(token) instead of bot.login(token).","message":"The 'login' method is deprecated in favor of 'start' or 'run'. Using login() may break in future versions.","severity":"deprecated","affected_versions":">=2.0"},{"fix":"Consider using a bot account with discord.py instead.","message":"This library violates Discord's Terms of Service. Using it for self-botting can lead to permanent account suspension. Use at your own risk.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'2.1.0':22 '3.10':25 'account':20,45,57 'allow':16 'api':15,51,64 'autom':17 'ban':46 'bot':14,61 'discord':2,10,33,37,58 'discord-py-self':1 'discord.py':53 'lead':43 'librari':27 'offici':30 'often':42 'py':3 'python':6,24 'self':4,13,60 'self-bot':12,59 'servic':41 'similar':50 'support':23,31 'term':39 'use':48 'user':11,19,56,63 'user-api':62 'version':21 'wrapper':7,65","created_at":"2026-05-01T08:08:20.401964+00:00","updated_at":"2026-05-01T08:08:20.401964+00:00","problems":[{"fix":"Add intents=discord.Intents.default() to your Client or Bot constructor.","cause":"Intents are mandatory starting in version 2.0.0.","error":"TypeError: __init__() missing 1 required positional argument: 'intents'"},{"fix":"Use bot.run(token) or await bot.start(token) instead.","cause":"The login method was removed in later versions of 2.x.","error":"AttributeError: 'Bot' object has no attribute 'login'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"2.1.0","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/dolfies/discord.py-self","docs":"https://discordpy-self.readthedocs.io/en/latest/","changelog":null,"pypi":"https://pypi.org/project/discord-py-self/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["communication","http-networking","web-framework"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-29","last_verified":"2026-06-29","next_check":"2026-07-29","install_tag":null}}