This library allows http requests to Discord to be simplified.
Project description
Discord Self Request (DiscordSR) Library Ver0.1.0
The DiscordSR library is a Python package designed to interact with Discord's API. It enables users to automate various actions on Discord, such as changing nicknames, managing statuses, moderating users, and more.
Update Feature
- fixed
webhook_send
Features
- Change your nickname in a guild with
guild_mynick. - Change another user's nickname in a guild with
guild_IDnick. - Update your Discord status with
status. - Timeout a user in a guild with
timeout. - Remove a timeout from a user with
untimeout. - Kick a user from a guild with
kick. - Ban a user from a guild with
ban. - Report a user with
report. - Check if a Discord token is valid with
token_check. - Check if a Discord Nitro code is valid with
nitro_check. - Send a message to a channel with
send. - Send a sticker to a channel with
sticker_send. - Send a TTS (Text-to-Speech) message in a channel with
tts_send. - Bump a server in server listings with
bump. - dissoku_up a server in server listings with
dissoku. - Add a normal reaction to a message with
normal_reaction. - Add a custom emoji reaction to a message with
custom_reaction. - Delete all emojis of reactions to a message with
all_reaction_delete. - Send a message through a Discord webhook with
webhook_send. - Delete a Discord webhook with
webhook_delete. - generate token's friend request Link with
friend_RQ_Link_gen.
Installation
This library using requests .
To install the requests and DiscordSR library, use pip:
bash
pip install requests
pip install DiscordSR
Return
The response in json format or status code is returned.
Cautions for use
Functions that change other people's nicknames, etc., cannot be changed unless you own the permission, and an error will be returned.
Function
guild_mynick
Description: Change your nickname on a specific server
Parameters:
token(str): user token to be usedserver_id(int): The ID of the server where the nickname will be changed.nick(str): A new nickname to be set for the user.
guild_IDnick
Description: Changes the nickname of another user on a specific server.
Parameters:
token(str): user token to be usedserver_id(int): The ID of the server where the nickname will be changed.user_id(int): The ID of the user whose nickname will be changed.nick(str): The new nickname to be set for the user.
status
Description: Update the user's Discord status.
Parameters:
token(str): user token to be usedmsg(str): The new status message to be displayed.
timeout
Description: Time out user.
Parameters:
-
token(str): user token to be used -
server_id(int): The ID of the server where the user will be timed out. -
user_id(int): The ID of the user to be timed out. -
mode(int): The duration of the timeout in predefined modes (1 to 6).- 1 : 60seconds
- 2 : 5minutes
- 3 : 10minutes
- 4 : 1hour
- 5 : 1day
- 6 : 1weak
untimeout
Description: Remove user timeout.
Parameters:
token(str): user token to be usedserver_id(int): The ID of the server where the user will be untimeout.user_id(int): The ID of the user to have the timeout removed.
kick
Description: Kick a user.
Parameters:
token(str): user token to be usedserver_id(int): The ID of the server from which the user will be kicked.user_id(int): The ID of the user to be kicked.
ban
Description: Bans a user from a server and optionally deletes their previous messages.
Parameters:
token(str): user token to be usedserver_id(int): The ID of the server where the user will be banned.user_id(int): The ID of the user to be banned.deletemsg_time(int): The time in seconds to delete messages from the user.
report
Description: Reports a user for violations within a server.
Parameters:
token(str): user token to be usedserver_id(int): The ID of the server where the user is to be reported.user_id(int): The ID of the user to be reported.
token_check
Description: Checks if a Discord token is valid.
Parameters:
token(str): The Discord token to be validated.
nitro_check
Description: Checks if a Discord Nitro code(16) is valid.
Parameters:
code(str): The Discord Nitro code to be validated.
send
Description: Sends a message to a specified channel.
Parameters:
token(str): user token to be usedchannel_id(int): The ID of the channel where the message will be sent.msg(str): The message to be sent.
about custom emoji: <:emoji_name:emoji_id>
- Type "{emoji_name}" on the server where the emoji you want to use exists to get the emoji_id. Please enter the name of the emoji in {emoji_name}.
sticker_send
Description: Sends a sticker to a specified channel.
Parameters:
token(str): user token to be usedchannel_id(int): The ID of the channel where the message will be sent.sticker_id(str): sticker to send.
about custom emoji: <:emoji_name:emoji_id>
- Type "{emoji_name}" on the server where the emoji you want to use exists to get the emoji_id. Please enter the name of the emoji in {emoji_name}.
tts_send
Send a TTS message in a Discord channel.
Parameters:
token(str): The user token to authenticate the request.channel_id(int): The ID of the channel where the TTS message will be sent.msg(str): The message to be sent as TTS.
bump
※This function is Test.
Description: Bumps a server in server listings to increase its visibility.
Parameters:
token(str): user token to be usedserver_id(int): The ID of the server to be bumped.channel_id(int): The ID of the channel where the bump command is executed.
dissoku
※This function is Test.
Description: dissoku_up a server in server listings to increase its visibility.
Parameters:
token(str): user token to be usedserver_id(int): The ID of the server to be bumped.channel_id(int): The ID of the channel where the bump command is executed.
normal_reaction
Description: Adds a normal emoji reaction to a message.
Parameters:
token(str): user token to be usedchannel_id(int): The ID of the channel containing the message.msg_id(str): The ID of the message to react to.emoji(str): The emoji to be used for the reaction.
custom_reaction
Description: Adds a custom emoji reaction to a message.
Parameters:
token(str): user token to be usedchannel_id(int): The ID of the channel containing the message.msg_id(str): The ID of the message to which the reaction will be added.emoji_name(str): The name of the custom emoji.emoji_id(str): The ID of the custom emoji.
how to get emoji id
- Type "{emoji_name}" on the server where the emoji you want to use exists to get the emoji_id. Please enter the name of the emoji in {emoji_name}.
all_reaction_delete
Description: Delete all emojis of reactions to a message.
Parameters:
token(str): user token to be usedchannel_id(int): The ID of the channel containing the message.msg_id(str): The ID of the message to react to.
webhook_send
Description: Send a message through a Discord webhook.
Parameters:
webhook_url(str): The webhook URL to send the message to.name(int): The name to be displayed as the sender.avatar(str): The URL of the avatar image to be displayed as the sender.
webhook_delete
Description: Delete a Discord webhook.Can be deleted regardless of authorization.
Parameters:
webhook_url(str): The webhook URL to be deleted.
friend_RQ_Link_gen
Description: generate token's Friend Request Link.
Parameters:
token(str): Token to be used
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file DiscordSR-0.1.5.tar.gz.
File metadata
- Download URL: DiscordSR-0.1.5.tar.gz
- Upload date:
- Size: 9.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16d2ee68ad86b88ce85c64c8ea070798a4b9d3824f22ab1d923d974d77c26a78
|
|
| MD5 |
4e1e12452f2457d098033a1e490910cf
|
|
| BLAKE2b-256 |
95f74468a455dc13f52fb175fb62813d83b03176f63b7a32bead576c5fd059b0
|
File details
Details for the file DiscordSR-0.1.5-py3-none-any.whl.
File metadata
- Download URL: DiscordSR-0.1.5-py3-none-any.whl
- Upload date:
- Size: 9.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e1f322d3f9dc5dc1780c3af27316a5ef2b1f2c61c67f80bcdcc071e114cc4e4c
|
|
| MD5 |
99e122e8a7e5df0e6b7399ce285ca28a
|
|
| BLAKE2b-256 |
2c9054dfa27cbefa95b26d4cc70928c107d3992fa3bd3e72db7f636d6738340d
|