Skip to main content

A discord module that lets you send messages as a user

Project description

Discord Sender

Description

A discord module that lets you send messages as a user

Why this?

Other discord self-bots have more features but take up much more space. This can only send messages (for now) and is much more lightweight.

Installation

Install Using pip:

pip install discord-sender

Usage

Create a User:

# Import the module
import discord_sender.discord
# Create a user
user = discord_sender.discord.DiscordUser()

Authenticate with discord

Token Authentication (recommended):

user.login_with_token(<token>)

Credential Authentication:

user.login_with_credentials(<email>, <password>)

Send a message

user.send_message_to_user(<message>, <user id of recipient>)

Other commands

Check if user is logged in

if user.logged_in():
    do_stuff()

Send a message to a channel id

user.send_message_to_channel(<message>, <channel id>)

Get channel id for dm with user by user id

user.get_channel_id(<user id of recipient>)

Get a logged in users token

# Works even if credential auth was used
# Returns None if not logged in
user.user_info.get_token()

For the future

  • Add cookie authentication
  • Add sending in servers
  • Add tests

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

discord_sender-1.0.6.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

discord_sender-1.0.6-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file discord_sender-1.0.6.tar.gz.

File metadata

  • Download URL: discord_sender-1.0.6.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.1 Windows/11

File hashes

Hashes for discord_sender-1.0.6.tar.gz
Algorithm Hash digest
SHA256 b34713593f786ea410455794f81eb1544112e47ad342f19ced98a27a58c7ba44
MD5 a33238f0d4c4f58e570a89b1d0e9f097
BLAKE2b-256 b8349e42c6d835b08ee165f6424081d71f88d7b9f56146f7dcbf3c14d7c4f982

See more details on using hashes here.

File details

Details for the file discord_sender-1.0.6-py3-none-any.whl.

File metadata

  • Download URL: discord_sender-1.0.6-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.1 Windows/11

File hashes

Hashes for discord_sender-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 0e079130697c1d2a6494e7a5d8dab8bb64ccb60415ba131ea0bc2c36b046fbe7
MD5 fe692a01a7e11a822c0a0145e886e16f
BLAKE2b-256 b55fba9a7108adad10a20e8822fb2c30aef5eb9dc96c6d4121777678ee638aa2

See more details on using hashes here.

Supported by

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