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_userID(<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

Also works in servers

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()

Get dms

user.get_dms(<nice formatting, True or False>)

Get user info by id

user.get_user_info_by_id(<user id>)

Experimental:

Send message to username

user.send_message_to_username(<message>, <username>)

Get channel info

user.get_channel_info(<channel id>)

Get user info by username

user.get_user_info_by_username(<username>)

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

Uploaded Source

Built Distribution

discord_sender-2.0.4-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: discord_sender-2.0.4.tar.gz
  • Upload date:
  • Size: 6.8 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-2.0.4.tar.gz
Algorithm Hash digest
SHA256 c088280018fbe377eb3501024d51e35d0004ddc62fb3d2fa8c7091cd0b6c2006
MD5 d285d067885b4ea277a1a7387ddaa972
BLAKE2b-256 52e55fb25f68efadcbd8f2b623ca3818550935ec762f0d19ba111761ba66e534

See more details on using hashes here.

File details

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

File metadata

  • Download URL: discord_sender-2.0.4-py3-none-any.whl
  • Upload date:
  • Size: 8.8 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-2.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 53a806779e5734adb8f13904e03fba9fa0dac7737fa43efeedce6da0663dcc4f
MD5 cc7f79f481b3aeeba260e7604c4ea16b
BLAKE2b-256 d0f9c902f9ff340b84a85b3259a56e154ddc3c5030f894447bbdb1864771633a

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