A simple, easy to use, non-restrictive, synchronous Discord API Wrapper for Selfbots/Userbots written in Python.

Discum is a Discord self/userbot api wrapper (in case you didn't know, self/userbotting = automating a user account). Whenever you login to discord, your client communicates with Discord's servers using Discord's http api (http(s) requests) and gateway server (websockets). Discum allows you have this communication with Discord using python.

The main difference between Discum and other Discord api wrapper libraries (like discord.py) is that discum is written and maintained to work on user accounts (so, perfect for selfbots/userbots). We test code on here and develop discum to be readable, expandable, and useable. Functions that are risky to use are clearly stated as such in the docs.

Note, using a selfbot is against Discord's Terms of Service and you could get banned for using one if you're not careful. Also, this needs to be said: discum does not have rate limit handling. The main reasons for this are that discum is made to (1) be (relatively) simple and (2) give the developer/user freedom with how to handle the rate limits. We (Merubokkusu and anewrandomaccount) do not take any responsibility for any consequences you might face while using discum. We also do not take any responsibility for any damage caused (to servers/channels) through the use of Discum. Discum is a tool; how you use this tool is on you.


from github (recommended):

python -m pip install --user --upgrade git+https://github.com/Merubokkusu/Discord-S.C.U.M.git

Prerequisites (installed automatically using above methods)

  • requests
  • requests_toolbelt
  • brotli
  • websocket_client==0.59.0
  • filetype
  • ua-parser
  • random_user_agent

Example usage

import discum     
bot = discum.Client(token='420tokentokentokentoken.token.tokentokentokentokentoken', log={"console":True, "file":False})

bot.sendMessage("238323948859439", "Hello :)")

def helloworld(resp):
    if resp.event.ready_supplemental: #ready_supplemental is sent after ready
        user = bot.gateway.session.user
        print("Logged in as {}#{}".format(user['username'], user['discriminator']))
    if resp.event.message:
        m = resp.parsed.auto()
        guildID = m['guild_id'] if 'guild_id' in m else None #because DMs are technically channels too
        channelID = m['channel_id']
        username = m['author']['username']
        discriminator = m['author']['discriminator']
        content = m['content']
        print("> guild {} channel {} | {}#{}: {}".format(guildID, channelID, username, discriminator, content))



  • [x] Sending basic text messages
  • [X] Sending Images
  • [x] Sending Embeds
  • [X] Sending Requests (Friends etc)
  • [X] Profile Editing (Name,Status,Avatar)
  • [X] On-Message (and other on-anything gateway) capabilities
  • [X] Getting guild members
  • [X] improve documentation
  • [ ] add more http api wraps
  • [ ] Making phone calls, sending audio/video data thru those calls
  • [ ] Everything