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

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.1.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

discord_sender-1.0.1-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: discord_sender-1.0.1.tar.gz
  • Upload date:
  • Size: 4.2 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.1.tar.gz
Algorithm Hash digest
SHA256 c009aff43cdb59ed744bdd43d85b8e4607ab9f1913cc7dfd8fd446145cd9d17a
MD5 bfaf958690f17537a206d55df8698c70
BLAKE2b-256 07e473882d7d6663aa8dd4588d77191f2ac4220bb2dd80d68b1d63afb8630052

See more details on using hashes here.

File details

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

File metadata

  • Download URL: discord_sender-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3d1cf290d694df498ed5b5814a47dbb076c8cd7d7b248d45be193146ea354591
MD5 f1805980f2b71941ac46ed173c4cecb1
BLAKE2b-256 b600fd109cdda78ee55e221a7ab4d593d5c8ecccbf51f92a4d188ca07bc3be98

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