forked from OmegaDevStudio/Selfcord-Old
-
Notifications
You must be signed in to change notification settings - Fork 4
Quickstart
Shell edited this page Jan 16, 2024
·
1 revision
This example serves as a foundation for building more complex selfbots using the selfcord library. Feel free to customize configurations, events, and commands according to your bot's specific requirements.
import selfcord
token = "your token"
bot = selfcord.Bot(
prefixes=["!", "?"], # We allow multiple prefixes
eval=True, # There are some inbuilt commands by default
inbuilt_help=False
)
@bot.on("ready") # Events are specified with the `on` decorator
async def ready(time):
print(f"Bot was ready in {time:.2f} seconds")
@bot.cmd(description="Purge command", aliases=['clear']) # Commands are specified with the `cmd` decorator
async def purge(ctx, n: int):
await ctx.purge(n)
bot.run(token)
I'm in your walls