Skip to main content

Discord API toolkit for user tokens with token onliner functionality.

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

saferates-0.3.2.tar.gz (16.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

saferates-0.3.2-py3-none-any.whl (20.3 kB view details)

Uploaded Python 3

File details

Details for the file saferates-0.3.2.tar.gz.

File metadata

  • Download URL: saferates-0.3.2.tar.gz
  • Upload date:
  • Size: 16.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.1

File hashes

Hashes for saferates-0.3.2.tar.gz
Algorithm Hash digest
SHA256 a3d7f108434f18a14676f9b59b30581c2522d4c96cfb96accb5d6c826a865f40
MD5 0f9396b3e50725f873b77450750d3a57
BLAKE2b-256 71e0ea092d03c98fd7067601cbb0d4855056fa7cf3007c5aeb098e5c81ea0132

See more details on using hashes here.

File details

Details for the file saferates-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: saferates-0.3.2-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

Hashes for saferates-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d3d6dcf90bfc3a84b83bcc6d051720444bcab3d5328d3c9cfc9ea11d9617650f
MD5 1dfc06b803b6be8703d3a40aba5c79b8
BLAKE2b-256 7a2dd879b970e7f9150c601bdf28222f5b8de607c2a4e91d00bc77ce82b30588

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page