# 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:
```python
# Import the module
import discord_sender.discord
# Create a user
user = discord_sender.discord.DiscordUser()
```
### Authenticate with discord
#### Token Authentication (recommended):
```python
user.login_with_token(<token>)
```
#### Credential Authentication:
```python
user.login_with_credentials(<email>, <password>)
```
### Send a message
```python
user.send_message_to_userID(<message>, <user id of recipient>)
```
## Other commands
### Check if user is logged in
```python
if user.logged_in():
do_stuff()
```
### Send a message to a channel id
#### Also works in servers
```python
user.send_message_to_channel(<message>, <channel id>)
```
### Get channel id for dm with user by user id
```python
user.get_channel_id(<user id of recipient>)
```
### Get a logged in users token
```python
# Works even if credential auth was used
# Returns None if not logged in
user.user_info.get_token()
```
### Get dms
```python
user.get_dms(<nice formatting, True or False>)
```
### Get user info by id
```python
user.get_user_info_by_id(<user id>)
```
## Experimental:
### Send message to username
```python
user.send_message_to_username(<message>, <username>)
```
### Get channel info
```python
user.get_channel_info(<channel id>)
```
### Get user info by username
```python
user.get_user_info_by_username(<username>)
```
## For the future
- [ ] Add cookie authentication
- [X] Add sending in servers
- [ ] Add tests
Raw data
{
"_id": null,
"home_page": "https://github.com/Jacoblightning/discord-sender",
"name": "discord-sender",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "bot, discord, discordbot, user-bot",
"author": "Jacob",
"author_email": "112590190+Jacoblightning@users.noreply.github.com",
"download_url": "https://files.pythonhosted.org/packages/52/e5/5fb25f68efadcbd8f2b623ca3818550935ec762f0d19ba111761ba66e534/discord_sender-2.0.4.tar.gz",
"platform": null,
"description": "# Discord Sender\n## Description\n A discord module that lets you send messages as a user\n## Why this?\nOther discord self-bots have more features but take up much more space. This can only send messages (for now) and is much more lightweight.\n## Installation\n### Install Using pip:\n`pip install discord-sender`\n## Usage\n### Create a User:\n```python\n# Import the module\nimport discord_sender.discord\n# Create a user\nuser = discord_sender.discord.DiscordUser()\n```\n### Authenticate with discord\n#### Token Authentication (recommended):\n```python\nuser.login_with_token(<token>)\n```\n#### Credential Authentication:\n```python\nuser.login_with_credentials(<email>, <password>)\n```\n### Send a message\n\n```python\nuser.send_message_to_userID(<message>, <user id of recipient>)\n```\n## Other commands\n### Check if user is logged in\n```python\nif user.logged_in():\n do_stuff()\n```\n### Send a message to a channel id\n#### Also works in servers\n```python\nuser.send_message_to_channel(<message>, <channel id>)\n```\n### Get channel id for dm with user by user id\n```python\nuser.get_channel_id(<user id of recipient>)\n```\n### Get a logged in users token\n```python\n# Works even if credential auth was used\n# Returns None if not logged in\nuser.user_info.get_token()\n```\n### Get dms\n```python\nuser.get_dms(<nice formatting, True or False>)\n```\n### Get user info by id\n```python\nuser.get_user_info_by_id(<user id>)\n```\n## Experimental:\n### Send message to username\n```python\nuser.send_message_to_username(<message>, <username>)\n```\n### Get channel info\n```python\nuser.get_channel_info(<channel id>)\n```\n### Get user info by username\n```python\nuser.get_user_info_by_username(<username>)\n```\n## For the future\n- [ ] Add cookie authentication\n- [X] Add sending in servers\n- [ ] Add tests",
"bugtrack_url": null,
"license": "Unlicense",
"summary": "A discord module that lets you send messages as a user",
"version": "2.0.4",
"project_urls": {
"Documentation": "https://github.com/Jacoblightning/discord-sender/blob/main/README.md",
"Homepage": "https://github.com/Jacoblightning/discord-sender",
"Repository": "https://github.com/Jacoblightning/discord-sender"
},
"split_keywords": [
"bot",
" discord",
" discordbot",
" user-bot"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d0f9c902f9ff340b84a85b3259a56e154ddc3c5030f894447bbdb1864771633a",
"md5": "cc7f79f481b3aeeba260e7604c4ea16b",
"sha256": "53a806779e5734adb8f13904e03fba9fa0dac7737fa43efeedce6da0663dcc4f"
},
"downloads": -1,
"filename": "discord_sender-2.0.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "cc7f79f481b3aeeba260e7604c4ea16b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 8787,
"upload_time": "2024-03-29T22:29:14",
"upload_time_iso_8601": "2024-03-29T22:29:14.248995Z",
"url": "https://files.pythonhosted.org/packages/d0/f9/c902f9ff340b84a85b3259a56e154ddc3c5030f894447bbdb1864771633a/discord_sender-2.0.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "52e55fb25f68efadcbd8f2b623ca3818550935ec762f0d19ba111761ba66e534",
"md5": "d285d067885b4ea277a1a7387ddaa972",
"sha256": "c088280018fbe377eb3501024d51e35d0004ddc62fb3d2fa8c7091cd0b6c2006"
},
"downloads": -1,
"filename": "discord_sender-2.0.4.tar.gz",
"has_sig": false,
"md5_digest": "d285d067885b4ea277a1a7387ddaa972",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 6840,
"upload_time": "2024-03-29T22:29:15",
"upload_time_iso_8601": "2024-03-29T22:29:15.406618Z",
"url": "https://files.pythonhosted.org/packages/52/e5/5fb25f68efadcbd8f2b623ca3818550935ec762f0d19ba111761ba66e534/discord_sender-2.0.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-29 22:29:15",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Jacoblightning",
"github_project": "discord-sender",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "discord-sender"
}