Skip to main content

SELFCORD

A Powerful Library for Discord Selfbots

Feautres

  • Modern Pythonic API using async/await syntax
  • Easy to use with an object oriented design
  • Optimised for both speed and memory
  • Prevents detection of user account automation
  • Multi-token support
  • Clean Documentation (not real)
  • Community Support

Installation

Python 3.10 or higher is required.

pip install selfcord.py

Wiki

Read our Wiki in regards to documentation and getting started.

Getting Started

A selfbot that responds to a message ("ping!") with another message ("pong").

import selfcord

token = "insert token"
bot = selfcord.Bot()

@bot.on("ready")
async def ready(time):
    print(f"Connected To {bot.user.name}\n Startup took {time:0.2f} seconds")

@bot.on("message")
async def responder(message):
    if message.content == "ping!":
        await message.channel.send("pong!")

bot.run(token)

Examples/Usage

Message logger

In this snippet, If someone deletes messages in the server, it records details such as the server name, channel name, message content, and the author's name

import selfcord

token = "insert token"
bot = selfcord.Bot(prefixes=["!", "?"])

@bot.on("ready")
async def ball(time):
    print(f"Connected To {bot.user}\n Startup took {time:0.2f} seconds")

@bot.on("message_delete")
async def message_logger(message):
    # DISCLAIMER: If message is not in bots cache only message id, channel id and guild id will be present
    if message.author != None:
        if message.author.id != bot.user.id:
            if message.guild != None: # If the message is in a guild
                await aprint(f"""MESSAGE LOGGED:
SERVER: {message.guild.name}
CHANNEL: {message.channel.name}
CONTENT:
{message.author}: {message.content}
""")
        else: # If the message is in a DM or Group chat
            await aprint(f"""MESSAGE LOGGED:
CHANNEL: {message.channel}
CONTENT:
{message.author}: {message.content}
            """)

bot.run(token)

Purge command

In this snippet, you are able to delete certain amount of messages from a channel

import selfcord

token = "insert token"
bot = selfcord.Bot(prefixes=["!", "?"])

@bot.on("ready")
async def ball(time):
    print(f"Connected To {bot.user}\n Startup took {time:0.2f} seconds")

@bot.cmd(description="Purges the channel", aliases=["wipe", "clear"])
async def purge(ctx, amount: int=None):
    await ctx.purge(amount)

bot.run(token)

Deleted message sniper

In this snippet, you can retrieve the most recently deleted message.

import selfcord

token = "insert token"
bot = selfcord.Bot(prefixes=["!", "?"])

@bot.on("ready")
async def ball(time):
    print(f"Connected To {bot.user}\n Startup took {time:0.2f} seconds")

@bot.cmd(description="Snipe", aliases=['s'])
async def snipe(ctx):
    await ctx.reply(f"{bot.user.deleted_messages[-1].author}: {bot.user.deleted_messages[-1]}")

bot.run(token)

Captcha

2Captcha is the only captcha solving service supported currently.

Some Useful Links

Contributing

Contributors are always Welcome

Metadata

Release files for selfcord.py 1.0.3

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

Source distribution (sdist)

Source distribution for selfcord.py 1.0.3
File Size Uploaded
selfcord_py-1.0.3.tar.gz 42.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for selfcord.py 1.0.3
File Interpreter ABI Platform
selfcord_py-1.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 90.7 kB

Release files / selfcord_py-1.0.3.tar.gz

Download URL selfcord_py-1.0.3.tar.gz
Size 42.4 kB
Tags Source
SHA-256 checksum
How to use checksums
664d44b80a2112d2be18a5aba7661f8e6a51bf72fe484f21d5fd99c2e4587ad6
BLAKE2b-256 checksum
How to use checksums
5ca21d1a8dcdb8f23bc69f4b33cb5e0f9feed0fa7fbd51f433200aa13fd4bdf0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release files / selfcord_py-1.0.3-py3-none-any.whl

Download URL selfcord_py-1.0.3-py3-none-any.whl
Size 48.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ba4a08fe0c321c639ac17db4edfdbde463091f3f2cc2c13fb65a357a0bf587d7
BLAKE2b-256 checksum
How to use checksums
4ced597a0f3c2d7a6da2de073b6f6431bd2842571f6f79c21fba2a0cc84d9cec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

1.0.3 This release

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.10

2 release files

0.0.9

1 release file

0.0.8

1 release file

0.0.7

1 release file

0.0.6

1 release file

0.0.5

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

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