{"id":19367564,"url":"https://github.com/jacoblightning/discord-sender","last_synced_at":"2026-01-05T06:48:07.833Z","repository":{"id":221837605,"uuid":"755512831","full_name":"Jacoblightning/discord-sender","owner":"Jacoblightning","description":"A discord module that lets you send messages as a user","archived":false,"fork":false,"pushed_at":"2024-05-28T20:41:07.000Z","size":161,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T11:16:38.826Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Jacoblightning.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-02-10T12:49:21.000Z","updated_at":"2024-02-10T18:12:29.000Z","dependencies_parsed_at":"2024-02-10T14:23:21.204Z","dependency_job_id":"81d2d2ea-c8d9-4439-b436-2e06c00505df","html_url":"https://github.com/Jacoblightning/discord-sender","commit_stats":null,"previous_names":["jacoblightning/discord-sender"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jacoblightning%2Fdiscord-sender","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jacoblightning%2Fdiscord-sender/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jacoblightning%2Fdiscord-sender/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jacoblightning%2Fdiscord-sender/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Jacoblightning","download_url":"https://codeload.github.com/Jacoblightning/discord-sender/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245258212,"owners_count":20585977,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T08:03:26.245Z","updated_at":"2026-01-05T06:48:07.794Z","avatar_url":"https://github.com/Jacoblightning.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 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(\u003ctoken\u003e)\n```\n#### Credential Authentication:\n```python\nuser.login_with_credentials(\u003cemail\u003e, \u003cpassword\u003e)\n```\n### Send a message\n\n```python\nuser.send_message_to_userID(\u003cmessage\u003e, \u003cuser id of recipient\u003e)\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(\u003cmessage\u003e, \u003cchannel id\u003e)\n```\n### Get channel id for dm with user by user id\n```python\nuser.get_channel_id(\u003cuser id of recipient\u003e)\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(\u003cnice formatting, True or False\u003e)\n```\n### Get user info by id\n```python\nuser.get_user_info_by_id(\u003cuser id\u003e)\n```\n## Experimental:\n### Send message to username\n```python\nuser.send_message_to_username(\u003cmessage\u003e, \u003cusername\u003e)\n```\n### Get channel info\n```python\nuser.get_channel_info(\u003cchannel id\u003e)\n```\n### Get user info by username\n```python\nuser.get_user_info_by_username(\u003cusername\u003e)\n```\n## For the future\n- [ ] Add cookie authentication\n- [X] Add sending in servers\n- [ ] Add tests","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacoblightning%2Fdiscord-sender","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjacoblightning%2Fdiscord-sender","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacoblightning%2Fdiscord-sender/lists"}