Discord API toolkit for user tokens with token onliner functionality (selfbot use mainly).
Project description
saferates
Developed by: DriizzyyB
WARNING: User-token automation is against Discord ToS and can get your account banned.
This library is for education/research only.
Need support? Join my Discord: https://discord.gg/2WPWZdKZxs
Features (as of v0.2.2)
- Fully modular: each Discord function in its own
Saferates*class - User-token only, for advanced Discord user automation
- Messaging: Send/edit/delete, bulk, crosspost, pins, embeds, files, stickers
- Webhooks: Send, edit, delete webhooks
- Channels: Create, edit, delete text/voice/category
- DMs: List, send, delete, bulk DM, prune spam DMs
- Friends: Add, remove, block, unblock, export list
- Guilds: List, join, leave, mass leave, create invites, backup/export
- Roles: Add/remove self roles
- Reactions: Add, remove, bulk
- Embeds: Build/send rich embeds
- Presence: Set custom status, presence, fake activities
- Nitro: Check Nitro, use perks
- Audit: Fetch audit logs
- Voice: Join/move/leave voice channels
- Moderator: Kick, ban, unban, timeout
- Polls: Create polls using reactions
- Reminders: Schedule DM reminders
- Welcome: Auto-welcome new friends/guilds
- Emojis: List, upload, delete, steal emojis
- AntiSpam: Prune non-friend DMs
- Event system: Register event handlers
- Command handler: Add your own saferates commands
- Utilities: Emoji encoder, pretty print, file upload helper, and more
- Logging: Color console/file, log levels, all actions logged
Installation
pip install saferates
or for the latest from source:
bash Copy Edit git clone https://github.com/driizzyy/saferates.git cd saferates pip install .
Quick Example
from saferates import ( SaferatesAPI, SaferatesChannels, SaferatesFriends, SaferatesGuilds, SaferatesEmbeds, SaferatesWebhooks, SaferatesReminders, SaferatesBackup, SaferatesPolls, saferates_encode_emoji )
token = "YOUR_USER_TOKEN" api = SaferatesAPI(token)
Messaging
channels = SaferatesChannels(api) channels.saferates_send_message("CHANNEL_ID", "Hello! " + saferates_encode_emoji("😄"))
Send an embed
embeds = SaferatesEmbeds(api) embed = embeds.saferates_build_embed(title="Test", description="saferates embed", color=0x5865F2) embeds.saferates_send_embed("CHANNEL_ID", embed)
Friends
friends = SaferatesFriends(api) friends.saferates_add("USER_ID")
Guilds
guilds = SaferatesGuilds(api) print(guilds.saferates_list())
Webhooks
webhooks = SaferatesWebhooks() webhooks.saferates_send("WEBHOOK_URL", "Message via webhook")
Reminders
reminders = SaferatesReminders(api) reminders.saferates_remind_me("YOUR_USER_ID", "This is your reminder!", delay_seconds=60)
Create a poll
polls = SaferatesPolls(api) polls.saferates_create_poll("CHANNEL_ID", "What's your favorite color?", ["🔴", "🟢", "🔵"])
Logging
All actions are logged to console (color) and optionally to a file.
Set log level:
export SAFERATES_LOG_LEVEL=DEBUG
Log to file:
export SAFERATES_LOG_FILE=saferates.log
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file saferates-0.3.5.tar.gz.
File metadata
- Download URL: saferates-0.3.5.tar.gz
- Upload date:
- Size: 16.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d72d04e065adb7ebee98e51f43646e7e419412957feff5fb107da6e7b54bf0fe
|
|
| MD5 |
a78899b8aa20040022dcdd55e8ca0429
|
|
| BLAKE2b-256 |
b7458d212c15cdbe5687a70cd269e7b76e770270f8f990fdfbb9cb9082cdd1c1
|
File details
Details for the file saferates-0.3.5-py3-none-any.whl.
File metadata
- Download URL: saferates-0.3.5-py3-none-any.whl
- Upload date:
- Size: 20.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41570c90d6fe7a7bcf3c811b7dd99f5391c2941a425d5e4aeee38c7f1912c928
|
|
| MD5 |
38bffc734bca89dc4b625132d16c0115
|
|
| BLAKE2b-256 |
9bcf3d325eaa3b5993fde13ee614ad1de109bc8a6bae2b65d934547d984eba27
|