A Discord API wrapper designed for selfbots!
Project description
Selfcord
A discord selfbot API wrapper (WIP)
Installation
Run this in the command line.
pip install selfcord.py
Wiki
Read our Wiki in regards to documentation and getting started.
Examples
Aeterna Selfbot
A simple selfbot designed to showcase the library's features, intended to be seen as a template or base for other users.
Message logger
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
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
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)
Help & Support
Please join our discord server here.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
selfcord.py-0.1.2.tar.gz
(25.2 kB
view hashes)
Built Distribution
Close
Hashes for selfcord.py-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc8eea38c552751b25abf203a8c79487eca0db8165b2cd7c24dbdfe7d128972a |
|
MD5 | e0422130955a6c8cc6682ce6aefffa11 |
|
BLAKE2b-256 | be7af4c8f466e620fdcb2ebd576df720c751225b81915595b4ebe43d805d103e |