Discord Namespace
Thediscord namespace provides functions to interact with Discord’s API.
discord.send_message()
Send a message to a Discord channel.Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
channelId | string | The Discord channel ID to send the message to |
content | string | The message content to send |
Returns
Message object with properties:id(string) - Message IDchannel_id(string) - Channel IDcontent(string) - Message contentauthor(object) - Author info withid,username,bot
null if failed.
Example
discord.edit_message()
Edit an existing Discord message.Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
channelId | string | The Discord channel ID where the message is located |
messageId | string | The message ID to edit |
content | string | The new message content |
Returns
void
Example
discord.delete_message()
Delete a Discord message.Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
channelId | string | The Discord channel ID where the message is located |
messageId | string | The message ID to delete |
Returns
void
Example
HTTP Methods
All HTTP methods include stealth headers and Chrome TLS fingerprinting to bypass anti-bot detection:- Chrome 131 User-Agent and Sec-CH-UA headers
- Accept-Language, Accept-Encoding, and Sec-Fetch-* headers
- TLS handshake mimics real Chrome browser
- Response size: 1MB maximum
- Timeout: 10 seconds
- Custom headers can override defaults
discord.http_get()
Make an HTTP GET request to Discord API endpoints with anti-detection. Use this for Discord-related requests. TheAuthorization header with your token is automatically added. For non-Discord APIs, use ethone.http_get() instead.
Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
url | string | The Discord API URL to make a GET request to |
headers | object (optional) | Custom headers to override defaults |
Returns
HttpResponse - An object containing:
status(number): HTTP status code (e.g., 200, 404, 500). Returns 0 if request failed.statusText(string): HTTP status text (e.g., “200 OK”, “404 Not Found”). Empty string if request failed.headers(object): Response headers as an objectbody(string): Response body as a string (max 1MB). Empty string if request failed.
Example
discord.http_post()
Make an HTTP POST request to Discord API endpoints with anti-detection. Use this for Discord-related requests. TheAuthorization header with your token is automatically added. For non-Discord APIs, use ethone.http_post() instead.
Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
url | string | The Discord API URL to make a POST request to |
data | string | Request body (JSON string) |
headers | object (optional) | Custom headers to override defaults |
Returns
HttpResponse - An object containing:
status(number): HTTP status code (e.g., 200, 404, 500). Returns 0 if request failed.statusText(string): HTTP status text (e.g., “200 OK”, “404 Not Found”). Empty string if request failed.headers(object): Response headers as an objectbody(string): Response body as a string (max 1MB). Empty string if request failed.
Example
discord.http_put()
Make an HTTP PUT request to Discord API endpoints with anti-detection. Use this for Discord-related requests. TheAuthorization header with your token is automatically added. For non-Discord APIs, use ethone.http_put() instead.
Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
url | string | The Discord API URL to make a PUT request to |
data | string | Request body (JSON string) |
headers | object (optional) | Custom headers to override defaults |
Returns
HttpResponse - An object containing:
status(number): HTTP status code (e.g., 200, 404, 500). Returns 0 if request failed.statusText(string): HTTP status text (e.g., “200 OK”, “404 Not Found”). Empty string if request failed.headers(object): Response headers as an objectbody(string): Response body as a string (max 1MB). Empty string if request failed.
Example
discord.http_patch()
Make an HTTP PATCH request to Discord API endpoints with anti-detection. Use this for Discord-related requests. TheAuthorization header with your token is automatically added. For non-Discord APIs, use ethone.http_patch() instead.
Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
url | string | The Discord API URL to make a PATCH request to |
data | string | Request body (JSON string) |
headers | object (optional) | Custom headers to override defaults |
Returns
HttpResponse - An object containing:
status(number): HTTP status code (e.g., 200, 404, 500). Returns 0 if request failed.statusText(string): HTTP status text (e.g., “200 OK”, “404 Not Found”). Empty string if request failed.headers(object): Response headers as an objectbody(string): Response body as a string (max 1MB). Empty string if request failed.
Example
discord.http_delete()
Make an HTTP DELETE request to Discord API endpoints with anti-detection. Use this for Discord-related requests. TheAuthorization header with your token is automatically added. For non-Discord APIs, use ethone.http_delete() instead.
Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
url | string | The Discord API URL to make a DELETE request to |
headers | object (optional) | Custom headers to override defaults |
Returns
HttpResponse - An object containing:
status(number): HTTP status code (e.g., 200, 404, 500). Returns 0 if request failed.statusText(string): HTTP status text (e.g., “200 OK”, “404 Not Found”). Empty string if request failed.headers(object): Response headers as an objectbody(string): Response body as a string (max 1MB). Empty string if request failed.
Example
discord.fetch_message()
Fetch a Discord message by its ID.Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
channelId | string | Channel ID where the message is |
messageId | string | Message ID to fetch |
Returns
Message or null if not found
Example
discord.fetch_guild()
Fetch a Discord guild/server by its ID.Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
guildId | string | Guild ID to fetch |
Returns
Guild or null if not found
Example
discord.fetch_channel()
Fetch a Discord channel by its ID.Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
channelId | string | Channel ID to fetch |
Returns
Channel or null if not found
Example
discord.fetch_user()
Fetch a Discord user by their ID.Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
userId | string | User ID to fetch |
Returns
Author or null if not found
Example
discord.add_reaction()
Add a reaction to a message.Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
channelId | string | Channel ID |
messageId | string | Message ID |
emoji | string | Emoji (e.g., “+1” or custom emoji name) |
Returns
boolean - true if successful
Example
discord.remove_reaction()
Remove a reaction from a message.Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
channelId | string | Channel ID |
messageId | string | Message ID |
emoji | string | Emoji to remove |
userId | string | User ID (optional, defaults to self) |
Returns
boolean - true if successful
Example
discord.send_typing()
Send typing indicator in a channel.Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
channelId | string | Channel ID |
Returns
boolean - true if successful
Example
discord.pin_message()
Pin a message in a channel.Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
channelId | string | Channel ID |
messageId | string | Message ID to pin |
Returns
boolean - true if successful
Example
discord.unpin_message()
Unpin a message in a channel.Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
channelId | string | Channel ID |
messageId | string | Message ID to unpin |
Returns
boolean - true if successful
discord.add_role()
Add a role to a member.Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
guildId | string | Guild ID |
userId | string | User ID |
roleId | string | Role ID to add |
Returns
boolean - true if successful
Example
discord.remove_role()
Remove a role from a member.Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
guildId | string | Guild ID |
userId | string | User ID |
roleId | string | Role ID to remove |
Returns
boolean - true if successful
discord.kick_member()
Kick a member from a guild.Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
guildId | string | Guild ID |
userId | string | User ID to kick |
Returns
boolean - true if successful
Example
discord.ban_member()
Ban a member from a guild.Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
guildId | string | Guild ID |
userId | string | User ID to ban |
deleteMessageDays | number | Days of messages to delete (0-7, optional) |
Returns
boolean - true if successful
Example
discord.unban_member()
Unban a member from a guild.Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
guildId | string | Guild ID |
userId | string | User ID to unban |
Returns
boolean - true if successful
discord.leave_guild()
Leave a guild/server.Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
guildId | string | Guild ID to leave |
Returns
boolean - true if successful
discord.create_dm()
Create a DM channel with a user.Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
userId | string | User ID |
Returns
DM channel object withid property, or null if failed
Example
discord.create_channel()
Create a new channel in a guild.Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
guildId | string | Guild ID |
name | string | Channel name |
type | number | Channel type (0=text, 2=voice, 4=category, 5=news, optional, default: 0) |
options | object | Optional settings (topic, nsfw, parent_id, position) |
Returns
Channel object or null if failed
Example
discord.edit_channel()
Edit an existing channel.Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
channelId | string | Channel ID to edit |
options | object | Properties to update (name, topic, nsfw, position, parent_id) |
Returns
boolean - true if successful
Example
discord.delete_channel()
Delete a channel.Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
channelId | string | Channel ID to delete |
Returns
boolean - true if successful
Example
discord.create_role()
Create a new role in a guild.Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
guildId | string | Guild ID |
options | object | Optional role properties (name, color, hoist, mentionable) |
Returns
Role object ornull if failed
Example
discord.edit_role()
Edit an existing role.Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
guildId | string | Guild ID |
roleId | string | Role ID to edit |
options | object | Properties to update (name, color, hoist, mentionable, position) |
Returns
boolean - true if successful
Example
discord.delete_role()
Delete a role from a guild.Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
guildId | string | Guild ID |
roleId | string | Role ID to delete |
Returns
boolean - true if successful
Example
discord.edit_member()
Edit a guild member (nickname, roles, etc.).Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
guildId | string | Guild ID |
userId | string | User ID to edit |
options | object | Properties to update (nick, roles) |
Returns
boolean - true if successful
Example
discord.fetch_guilds()
Get all guilds (servers) the user is in.Syntax
Parameters
NoneReturns
Array of guild objects with properties:id(string) - Guild IDname(string) - Guild nameicon(string) - Icon hashowner_id(string) - Owner user IDmember_count(number) - Total member countdescription(string) - Guild description- And more guild properties
Example
discord.fetch_friends()
Get all friends/relationships. Note: Relationships are tracked via events and may not be fully available through this function.Syntax
Parameters
NoneReturns
Array of relationship objects (currently returns empty array - use relationship events instead).Example
discord.fetch_channel_history()
Get message history from a channel.Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
channelId | string | Channel ID to fetch messages from |
limit | number (optional) | Number of messages to fetch (default: 50, max: 100) |
beforeId | string (optional) | Fetch messages before this message ID |
Returns
Array of message objects with properties:id(string) - Message IDcontent(string) - Message contentauthor_id(string) - Author user IDauthor(string) - Author usernamechannel_id(string) - Channel IDguild_id(string) - Guild IDtimestamp(string) - Message timestampembeds(array) - Message embedsattachments(array) - Message attachments
Example
discord.fetch_guild_channels()
Get all channels in a guild.Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
guildId | string | Guild ID |
Returns
Array of channel objects with full channel properties (id, name, type, topic, etc.). Returns empty array if failed.Example
discord.fetch_guild_members()
Get members from a guild.Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
guildId | string | Guild ID |
limit | number (optional) | Number of members to fetch (default: 100, max: 1000) |
afterId | string (optional) | Fetch members after this user ID |
Returns
Array of member objects with properties:user(object) - User object with id, username, etc.nick(string) - Member nicknameroles(array) - Array of role IDsjoined_at(string) - Join timestamp
Example
discord.fetch_guild_roles()
Get all roles in a guild.Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
guildId | string | Guild ID |
Returns
Array of role objects with properties:id(string) - Role IDname(string) - Role namecolor(number) - Role colorhoist(boolean) - Display separatelyposition(number) - Role positionpermissions(string) - Permission bitsmanaged(boolean) - Managed by integrationmentionable(boolean) - Can be mentioned
Example
discord.fetch_pinned_messages()
Get pinned messages from a channel.Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
channelId | string | Channel ID |
Returns
Array of message objects with id, content, author, timestamp, etc. Returns empty array if failed.Example
discord.fetch_invites()
Get all invites for a guild.Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
guildId | string | Guild ID |
Returns
Array of invite objects with properties:code(string) - Invite codeguild_id(string) - Guild IDchannel_id(string) - Channel IDuses(number) - Current usesmax_uses(number) - Maximum usesmax_age(number) - Max age in secondstemporary(boolean) - Temporary membership
Example
discord.fetch_guild_bans()
Get all bans in a guild.Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
guildId | string | Guild ID |
Returns
Array of ban objects with properties:user(object) - Banned user objectreason(string) - Ban reason
Example
discord.search_guild_members()
Search guild members by username or nickname.Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
guildId | string | Guild ID |
query | string | Search query (username or nickname) |
limit | number (optional) | Number of results (default: 100, max: 1000) |
Returns
Array of member objects matching the search query. Returns empty array if failed.Example
discord.join_guild()
Join a Discord server using an invite code. Uses custom TLS fingerprinting for enhanced stealth.Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
inviteCode | string | Discord invite code or full invite URL |
- Just the code:
"test" - Discord.gg URL:
"discord.gg/test" - Full invite URL:
"https://discord.com/invite/test"
Returns
Object with properties:success(boolean) - Whether the join was successfulguild_id(string, optional) - ID of the joined guildguild_name(string, optional) - Name of the joined guilderror(string, optional) - Error message if failedcode(number, optional) - HTTP status code if failed
Example
Notes
- This function uses custom TLS fingerprinting to mimic a real browser
- The function automatically adds all necessary Discord API headers
- Rate limits apply - avoid joining too many servers in quick succession
- Some servers may have verification requirements that prevent immediate joining