{"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,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","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,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}