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.1.tar.gz (15.7 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.1-py3-none-any.whl (19.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: saferates-0.3.1.tar.gz
  • Upload date:
  • Size: 15.7 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.1.tar.gz
Algorithm Hash digest
SHA256 a079b054ab180248e583e19531f43b857b3e1ff756be7727838710e8d1862da3
MD5 c5dc0c5222cfc626e0cf3458b7f15fb0
BLAKE2b-256 d1e8737e80ee18c5add4aee1faba2e3dac3f6f06bdbb8ddb70d5ec66f32d000c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: saferates-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 19.9 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fe83192c0ec2e5890d5efeeb57c5954228efcafad22cd24a2d7d5284e7501a90
MD5 ec8e669a8da4aced41f21377141c6b9a
BLAKE2b-256 7783ffccd2a7bcbb9dd2b5f60ed63da141b83991e463ebf20bd44c87b9d1ebcc

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