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
Release history Release notifications | RSS feed
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.2.tar.gz
(4.6 kB
view hashes)
Built Distribution
Close
Hashes for discord_sender-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c263a045a851da730ef410d2f1937c7a744916a4c05ee5c21ffbc567091a5df6 |
|
MD5 | ef217d7ba944afaaddd5fe7e7c116bb6 |
|
BLAKE2b-256 | 2fd0b40f62b8e75c8cc9534f257de6dc25f6ee6808941cb090a083a67a8f6a65 |