- Modern Pythonic API using
async/awaitsyntax - 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
Python 3.10 or higher is required.
pip install selfcord.py
Read our Wiki in regards to documentation and getting started.
A selfbot that responds to a message ("ping!") with another message ("pong").
importselfcordtoken="insert token"bot=selfcord.Bot()
@bot.on("ready")asyncdefready(time):
print(f"Connected To {bot.user.name}\n Startup took {time:0.2f} seconds")
@bot.on("message")asyncdefresponder(message):
ifmessage.content=="ping!":
awaitmessage.channel.send("pong!")
bot.run(token)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
importselfcordtoken="insert token"bot=selfcord.Bot(prefixes=["!", "?"])
@bot.on("ready")asyncdefball(time):
print(f"Connected To {bot.user}\n Startup took {time:0.2f} seconds")
@bot.on("message_delete")asyncdefmessage_logger(message):
# DISCLAIMER: If message is not in bots cache only message id, channel id and guild id will be presentifmessage.author!=None:
ifmessage.author.id!=bot.user.id:
ifmessage.guild!=None: # If the message is in a guildawaitaprint(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 chatawaitaprint(f"""MESSAGE LOGGED:CHANNEL: {message.channel}CONTENT:{message.author}: {message.content} """)
bot.run(token)In this snippet, you are able to delete certain amount of messages from a channel
importselfcordtoken="insert token"bot=selfcord.Bot(prefixes=["!", "?"])
@bot.on("ready")asyncdefball(time):
print(f"Connected To {bot.user}\n Startup took {time:0.2f} seconds")
@bot.cmd(description="Purges the channel", aliases=["wipe", "clear"])asyncdefpurge(ctx, amount: int=None):
awaitctx.purge(amount)
bot.run(token)In this snippet, you can retrieve the most recently deleted message.
importselfcordtoken="insert token"bot=selfcord.Bot(prefixes=["!", "?"])
@bot.on("ready")asyncdefball(time):
print(f"Connected To {bot.user}\n Startup took {time:0.2f} seconds")
@bot.cmd(description="Snipe", aliases=['s'])asyncdefsnipe(ctx):
awaitctx.reply(f"{bot.user.deleted_messages[-1].author}: {bot.user.deleted_messages[-1]}")
bot.run(token)2Captcha is the only captcha solving service supported currently.
- Documentation
- Other Documentation (messy)
- PyPi
- Official Discord Server
- A simple selfbot designed to showcase the library's features
Contributors are always Welcome