Discord Selfbot - Rust 🦀
A powerful Discord selfbot library written in Rust. Fast, safe, and easy to use.
⚠️ HEADS UP: Using selfbots violates Discord's ToS and can get your account banned. Use at your own risk!
What's This?
This is a Rust library that lets you control your Discord account programmatically. Think of it as discord.js but for selfbots and written in Rust. It's blazingly fast thanks to Rust's performance and has a clean API that won't make you cry.
Features
- ✅ WebSocket Gateway - Real-time events, just works
- ✅ REST API - Everything you need from Discord's API
- ✅ Rich Presence - Flex with custom activities
- ✅ Custom Status - Show off what you're doing
- ✅ Spotify RPC - Fake or real, your choice
- ✅ Embeds - Pretty messages that stand out
- ✅ Polls - Create and vote on polls
- ✅ Async/Await - Powered by Tokio
- ✅ Type Safe - Rust's got your back
Getting Started
Add this to your Cargo.toml:
[]
= { = "." }
Or if you're working locally:
[]
= { = "https://github.com/ege0x77czz/rust-discord-selfbot" }
Quick Examples
Basic Setup
use ;
use Arc;
use async_trait;
;
async
Send a Message
let channel_id = "123456789".into;
client.send_message.await?;
Send an Embed
use ;
let embed = new
.title
.description
.color
.field
.footer
.image;
let payload = new
.content
.embed
.build;
client.send_message_advanced.await?;
Rich Presence (Flex Mode)
use RichPresence;
let presence = new
.state
.details
.large_image
.large_text
.party
.start_timestamp
.add_button
.to_activity;
client.set_activity.await?;
Custom Status
use CustomStatus;
let status = new
.emoji
.state
.to_activity;
client.set_activity.await?;
Create a Poll
use ;
let poll = new
.add_answer
.add_answer
.add_answer
.duration_hours
.allow_multiselect;
let payload = new.poll.build;
let message = client.send_message_advanced.await?;
// Vote for Rust obviously
client.vote_poll.await?;
Examples
Check out the examples/ folder for more:
basic.rs- Simple bot to get startedembed.rs- Sending fancy embedsrich_presence.rs- Show off with Rich Presencepoll.rs- Polls and voting
Run them like this:
Note: Don't forget to replace "token" with your actual Discord token in the code!
Getting Your Token
Open Discord, press Ctrl + Shift + I to open DevTools, go to Console, and paste this:
window..;
window..;
Your token will be copied to clipboard. Keep it secret!
All Events
Here's everything you can listen to:
What You Can Do
Client Methods
send_message(channel_id, content)- Send a quick messagesend_message_advanced(channel_id, payload)- Send message with embeds, polls, etc.edit_message(channel_id, message_id, content)- Edit your messagesdelete_message(channel_id, message_id)- Delete messagesget_message(channel_id, message_id)- Fetch a messageadd_reaction(channel_id, message_id, emoji)- React to messagesremove_reaction(channel_id, message_id, emoji)- Remove reactionsvote_poll(channel_id, message_id, answer_id)- Vote on pollstyping(channel_id)- Show typing indicatorset_presence(activities, status)- Set your presenceset_activity(activity)- Set a single activityset_status(status)- Just change your status
Message Helpers
message.reply.await?;
message.react.await?;
message.delete.await?;
message.edit.await?;
Requirements
- Rust 1.70+ (probably works on older versions too but haven't tested)
- Tokio runtime
Contributing
Found a bug? Want to add something cool? PRs are welcome! Just open an issue first if it's something big.
Legal Stuff
This is for educational purposes. Using selfbots is against Discord's Terms of Service. Your account might get banned. We're not responsible if that happens. You've been warned! ⚠️
Also, this project is licensed under MIT. Do whatever you want with it.
Need Help?
Open an issue on GitHub if you're stuck or something's broken.
Remember: This breaks Discord's ToS. Use responsibly (or don't get caught 😉)