Documentation Index
Fetch the complete documentation index at: https://docs.ethone.cc/llms.txt
Use this file to discover all available pages before exploring further.
Discord Namespace
The discord namespace provides functions to interact with Discord’s API.
discord.send_message()
Send a message to a Discord channel.
Syntax
discord.send_message(channelId, content)
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 ID
channel_id (string) - Channel ID
content (string) - Message content
author (object) - Author info with id, username, bot
Returns null if failed.
Example
ethone.on_command("ping", "Ping command", "ping", function(ctx) {
var msg = discord.send_message(ctx.channel.id, "Pong!");
if (msg) {
ethone.log("Sent message with ID: " + msg.id);
}
});
discord.edit_message()
Edit an existing Discord message.
Syntax
discord.edit_message(channelId, messageId, content)
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
let lastMessageId = null;
discord.on_message = function(ctx) {
if (ctx.content === ".edit") {
if (lastMessageId) {
var channelId = ctx.channel.id;
var messageId = lastMessageId;
var newContent = "This message was edited!";
discord.edit_message(channelId, messageId, newContent);
}
}
lastMessageId = ctx.message.id;
};
discord.delete_message()
Delete a Discord message.
Syntax
discord.delete_message(channelId, messageId)
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
discord.on_message = function(ctx) {
if (ctx.content.includes("badword")) {
var channelId = ctx.channel.id;
var messageId = ctx.message.id;
discord.delete_message(channelId, messageId);
ethone.log("Deleted message with bad word");
}
};
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
Limits:
- 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. The Authorization header with your token is automatically added. For non-Discord APIs, use ethone.http_get() instead.
Syntax
discord.http_get(url, headers?)
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 object
body (string): Response body as a string (max 1MB). Empty string if request failed.
Example
ethone.on_command("guildroles", "Get guild roles", "guildroles", function(ctx) {
var response = discord.http_get("https://discord.com/api/v10/guilds/" + ctx.guild.id + "/roles");
if (response.status === 200) {
var roles = JSON.parse(response.body);
var roleNames = roles.map(function(r) { return r.name; }).join(", ");
discord.send_message(ctx.channel.id, "Roles: " + roleNames);
} else {
discord.send_message(ctx.channel.id, "Failed to fetch roles (Status: " + response.status + ")");
}
});
discord.http_post()
Make an HTTP POST request to Discord API endpoints with anti-detection.
Use this for Discord-related requests. The Authorization header with your token is automatically added. For non-Discord APIs, use ethone.http_post() instead.
Syntax
discord.http_post(url, data, headers?)
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 object
body (string): Response body as a string (max 1MB). Empty string if request failed.
Example
ethone.on_command("createwebhook", "Create webhook", "createwebhook <name>", function(ctx) {
if (ctx.args.length === 0) {
discord.send_message(ctx.channel.id, "Usage: .createwebhook <name>");
return;
}
var payload = JSON.stringify({
name: ctx.args.join(" ")
});
var response = discord.http_post(
"https://discord.com/api/v10/channels/" + ctx.channel.id + "/webhooks",
payload
);
if (response.status === 201) {
discord.send_message(ctx.channel.id, "Webhook created!");
} else {
discord.send_message(ctx.channel.id, "Failed to create webhook (Status: " + response.status + ")");
}
});
discord.http_put()
Make an HTTP PUT request to Discord API endpoints with anti-detection.
Use this for Discord-related requests. The Authorization header with your token is automatically added. For non-Discord APIs, use ethone.http_put() instead.
Syntax
discord.http_put(url, data, headers?)
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 object
body (string): Response body as a string (max 1MB). Empty string if request failed.
Example
var data = JSON.stringify({ name: "Updated Channel Name" });
var response = discord.http_put("https://discord.com/api/v10/channels/" + ctx.channel.id, data);
if (response.status === 200) {
ethone.log("Channel updated successfully");
}
discord.http_patch()
Make an HTTP PATCH request to Discord API endpoints with anti-detection.
Use this for Discord-related requests. The Authorization header with your token is automatically added. For non-Discord APIs, use ethone.http_patch() instead.
Syntax
discord.http_patch(url, data, headers?)
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 object
body (string): Response body as a string (max 1MB). Empty string if request failed.
Example
var data = JSON.stringify({ nick: "NewNickname" });
var response = discord.http_patch("https://discord.com/api/v10/guilds/" + ctx.guild.id + "/members/@me", data);
if (response.status === 200) {
ethone.log("Nickname updated successfully");
}
discord.http_delete()
Make an HTTP DELETE request to Discord API endpoints with anti-detection.
Use this for Discord-related requests. The Authorization header with your token is automatically added. For non-Discord APIs, use ethone.http_delete() instead.
Syntax
discord.http_delete(url, headers?)
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 object
body (string): Response body as a string (max 1MB). Empty string if request failed.
Example
ethone.on_command("deletewebhook", "Delete webhook", "deletewebhook <id>", function(ctx) {
if (ctx.args.length === 0) {
discord.send_message(ctx.channel.id, "Usage: .deletewebhook <id>");
return;
}
var response = discord.http_delete(
"https://discord.com/api/v10/webhooks/" + ctx.args[0]
);
if (response.status === 204) {
discord.send_message(ctx.channel.id, "Webhook deleted!");
} else {
discord.send_message(ctx.channel.id, "Failed to delete webhook (Status: " + response.status + ")");
}
});
discord.fetch_message()
Fetch a Discord message by its ID.
Syntax
discord.fetch_message(channelId, messageId)
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
ethone.on_command("quote", "Quote a message", "quote <messageId>", function(ctx) {
if (ctx.args.length < 1) {
discord.send_message(ctx.channel.id, "Usage: .quote <messageId>");
return;
}
var msg = discord.fetch_message(ctx.channel.id, ctx.args[0]);
if (msg) {
discord.send_message(ctx.channel.id, msg.author + ": " + msg.content);
} else {
discord.send_message(ctx.channel.id, "Message not found");
}
});
discord.fetch_guild()
Fetch a Discord guild/server by its ID.
Syntax
discord.fetch_guild(guildId)
Parameters
| Parameter | Type | Description |
|---|
guildId | string | Guild ID to fetch |
Returns
Guild or null if not found
Example
ethone.on_command("guildinfo", "Get info about a guild", "guildinfo", function(ctx) {
var guild = discord.fetch_guild(ctx.guild.id);
if (guild) {
var info = "Guild: " + guild.name + "\n";
info += "Members: " + guild.member_count + "\n";
info += "Owner ID: " + guild.owner_id;
discord.send_message(ctx.channel.id, info);
}
});
discord.fetch_channel()
Fetch a Discord channel by its ID.
Syntax
discord.fetch_channel(channelId)
Parameters
| Parameter | Type | Description |
|---|
channelId | string | Channel ID to fetch |
Returns
Channel or null if not found
Example
ethone.on_command("channelinfo", "Get channel info", "channelinfo", function(ctx) {
var channel = discord.fetch_channel(ctx.channel.id);
if (channel) {
var info = "Channel: #" + channel.name + "\n";
info += "Type: " + channel.type + "\n";
info += "Topic: " + (channel.topic || "None");
discord.send_message(ctx.channel.id, info);
}
});
discord.fetch_user()
Fetch a Discord user by their ID.
Syntax
discord.fetch_user(userId)
Parameters
| Parameter | Type | Description |
|---|
userId | string | User ID to fetch |
Returns
Author or null if not found
Example
ethone.on_command("userinfo", "Get user info", "userinfo <userId>", function(ctx) {
if (ctx.args.length < 1) {
discord.send_message(ctx.channel.id, "Usage: .userinfo <userId>");
return;
}
var user = discord.fetch_user(ctx.args[0]);
if (user) {
var info = "User: " + user.username + "\n";
info += "ID: " + user.id + "\n";
info += "Bot: " + (user.bot ? "Yes" : "No");
discord.send_message(ctx.channel.id, info);
} else {
discord.send_message(ctx.channel.id, "User not found");
}
});
discord.add_reaction()
Add a reaction to a message.
Syntax
discord.add_reaction(channelId, messageId, emoji)
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
ethone.on_command("react", "Add reaction", "react <messageId> <emoji>", function(ctx) {
if (ctx.args.length < 2) {
discord.send_message(ctx.channel.id, "Usage: .react <messageId> <emoji>");
return;
}
if (discord.add_reaction(ctx.channel.id, ctx.args[0], ctx.args[1])) {
discord.send_message(ctx.channel.id, "Reaction added!");
}
});
discord.remove_reaction()
Remove a reaction from a message.
Syntax
discord.remove_reaction(channelId, messageId, emoji, userId)
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.remove_reaction(ctx.channel.id, messageId, "+1");
discord.remove_reaction(ctx.channel.id, messageId, "+1", userId);
discord.send_typing()
Send typing indicator in a channel.
Syntax
discord.send_typing(channelId)
Parameters
| Parameter | Type | Description |
|---|
channelId | string | Channel ID |
Returns
boolean - true if successful
Example
ethone.on_command("think", "Show typing", "think", function(ctx) {
discord.send_typing(ctx.channel.id);
ethone.sleep(3000);
discord.send_message(ctx.channel.id, "Done thinking!");
});
discord.pin_message()
Pin a message in a channel.
Syntax
discord.pin_message(channelId, messageId)
Parameters
| Parameter | Type | Description |
|---|
channelId | string | Channel ID |
messageId | string | Message ID to pin |
Returns
boolean - true if successful
Example
ethone.on_command("pin", "Pin message", "pin <messageId>", function(ctx) {
if (ctx.args.length < 1) {
discord.send_message(ctx.channel.id, "Usage: .pin <messageId>");
return;
}
if (discord.pin_message(ctx.channel.id, ctx.args[0])) {
discord.send_message(ctx.channel.id, "Message pinned!");
}
});
discord.unpin_message()
Unpin a message in a channel.
Syntax
discord.unpin_message(channelId, messageId)
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
discord.add_role(guildId, userId, roleId)
Parameters
| Parameter | Type | Description |
|---|
guildId | string | Guild ID |
userId | string | User ID |
roleId | string | Role ID to add |
Returns
boolean - true if successful
Example
ethone.on_command("giverole", "Give role", "giverole <userId> <roleId>", function(ctx) {
if (ctx.args.length < 2) {
discord.send_message(ctx.channel.id, "Usage: .giverole <userId> <roleId>");
return;
}
if (discord.add_role(ctx.guild.id, ctx.args[0], ctx.args[1])) {
discord.send_message(ctx.channel.id, "Role added!");
}
});
discord.remove_role()
Remove a role from a member.
Syntax
discord.remove_role(guildId, userId, roleId)
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
discord.kick_member(guildId, userId)
Parameters
| Parameter | Type | Description |
|---|
guildId | string | Guild ID |
userId | string | User ID to kick |
Returns
boolean - true if successful
Example
ethone.on_command("kick", "Kick member", "kick <userId>", function(ctx) {
if (ctx.args.length < 1) {
discord.send_message(ctx.channel.id, "Usage: .kick <userId>");
return;
}
if (discord.kick_member(ctx.guild.id, ctx.args[0])) {
discord.send_message(ctx.channel.id, "Member kicked!");
}
});
discord.ban_member()
Ban a member from a guild.
Syntax
discord.ban_member(guildId, userId, deleteMessageDays)
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
ethone.on_command("ban", "Ban member", "ban <userId> [days]", function(ctx) {
if (ctx.args.length < 1) {
discord.send_message(ctx.channel.id, "Usage: .ban <userId> [days]");
return;
}
var days = ctx.args.length > 1 ? parseInt(ctx.args[1]) : 0;
if (discord.ban_member(ctx.guild.id, ctx.args[0], days)) {
discord.send_message(ctx.channel.id, "Member banned!");
}
});
discord.unban_member()
Unban a member from a guild.
Syntax
discord.unban_member(guildId, userId)
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
discord.leave_guild(guildId)
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
discord.create_dm(userId)
Parameters
| Parameter | Type | Description |
|---|
userId | string | User ID |
Returns
DM channel object with id property, or null if failed
Example
ethone.on_command("dm", "Send DM", "dm <userId> <message>", function(ctx) {
if (ctx.args.length < 2) {
discord.send_message(ctx.channel.id, "Usage: .dm <userId> <message>");
return;
}
var dm = discord.create_dm(ctx.args[0]);
if (dm) {
var message = ctx.args.slice(1).join(" ");
discord.send_message(dm.id, message);
discord.send_message(ctx.channel.id, "DM sent!");
}
});
discord.create_channel()
Create a new channel in a guild.
Syntax
discord.create_channel(guildId, name, type, options)
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
ethone.on_command("createchannel", "Create channel", "createchannel <name>", function(ctx) {
if (ctx.args.length < 1) {
discord.send_message(ctx.channel.id, "Usage: .createchannel <name>");
return;
}
if (!ctx.guild.id) {
discord.send_message(ctx.channel.id, "This command can only be used in a server");
return;
}
var name = ctx.args.join("-");
var channel = discord.create_channel(ctx.guild.id, name, 0, {
topic: "Created via script",
nsfw: false
});
if (channel) {
discord.send_message(ctx.channel.id, "Created channel: #" + channel.name);
} else {
discord.send_message(ctx.channel.id, "Failed to create channel");
}
});
discord.edit_channel()
Edit an existing channel.
Syntax
discord.edit_channel(channelId, options)
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
ethone.on_command("editchannel", "Edit channel", "editchannel <topic>", function(ctx) {
if (ctx.args.length < 1) {
discord.send_message(ctx.channel.id, "Usage: .editchannel <topic>");
return;
}
var topic = ctx.args.join(" ");
if (discord.edit_channel(ctx.channel.id, { topic: topic })) {
discord.send_message(ctx.channel.id, "Channel updated!");
} else {
discord.send_message(ctx.channel.id, "Failed to update channel");
}
});
discord.delete_channel()
Delete a channel.
Syntax
discord.delete_channel(channelId)
Parameters
| Parameter | Type | Description |
|---|
channelId | string | Channel ID to delete |
Returns
boolean - true if successful
Example
ethone.on_command("deletechannel", "Delete channel", "deletechannel <channelId>", function(ctx) {
if (ctx.args.length < 1) {
discord.send_message(ctx.channel.id, "Usage: .deletechannel <channelId>");
return;
}
if (discord.delete_channel(ctx.args[0])) {
discord.send_message(ctx.channel.id, "Channel deleted!");
} else {
discord.send_message(ctx.channel.id, "Failed to delete channel");
}
});
discord.create_role()
Create a new role in a guild.
Syntax
discord.create_role(guildId, options)
Parameters
| Parameter | Type | Description |
|---|
guildId | string | Guild ID |
options | object | Optional role properties (name, color, hoist, mentionable) |
Returns
Role object or null if failed
Example
ethone.on_command("createrole", "Create role", "createrole <name>", function(ctx) {
if (ctx.args.length < 1) {
discord.send_message(ctx.channel.id, "Usage: .createrole <name>");
return;
}
var role = discord.create_role(ctx.guild.id, {
name: ctx.args.join(" "),
color: 0xFF5733,
hoist: true,
mentionable: true
});
if (role) {
discord.send_message(ctx.channel.id, "Created role: " + role.name);
} else {
discord.send_message(ctx.channel.id, "Failed to create role");
}
});
discord.edit_role()
Edit an existing role.
Syntax
discord.edit_role(guildId, roleId, options)
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
ethone.on_command("editrole", "Edit role", "editrole <roleId> <name>", function(ctx) {
if (ctx.args.length < 2) {
discord.send_message(ctx.channel.id, "Usage: .editrole <roleId> <name>");
return;
}
var roleId = ctx.args[0];
var name = ctx.args.slice(1).join(" ");
if (discord.edit_role(ctx.guild.id, roleId, { name: name, color: 0x00FF00 })) {
discord.send_message(ctx.channel.id, "Role updated!");
} else {
discord.send_message(ctx.channel.id, "Failed to update role");
}
});
discord.delete_role()
Delete a role from a guild.
Syntax
discord.delete_role(guildId, roleId)
Parameters
| Parameter | Type | Description |
|---|
guildId | string | Guild ID |
roleId | string | Role ID to delete |
Returns
boolean - true if successful
Example
ethone.on_command("deleterole", "Delete role", "deleterole <roleId>", function(ctx) {
if (ctx.args.length < 1) {
discord.send_message(ctx.channel.id, "Usage: .deleterole <roleId>");
return;
}
if (discord.delete_role(ctx.guild.id, ctx.args[0])) {
discord.send_message(ctx.channel.id, "Role deleted!");
} else {
discord.send_message(ctx.channel.id, "Failed to delete role");
}
});
discord.edit_member()
Edit a guild member (nickname, roles, etc.).
Syntax
discord.edit_member(guildId, userId, options)
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
ethone.on_command("setnick", "Set nickname", "setnick <userId> <nickname>", function(ctx) {
if (ctx.args.length < 2) {
discord.send_message(ctx.channel.id, "Usage: .setnick <userId> <nickname>");
return;
}
var userId = ctx.args[0];
var nick = ctx.args.slice(1).join(" ");
if (discord.edit_member(ctx.guild.id, userId, { nick: nick })) {
discord.send_message(ctx.channel.id, "Nickname updated!");
} else {
discord.send_message(ctx.channel.id, "Failed to update nickname");
}
});
discord.fetch_guilds()
Get all guilds (servers) the user is in.
Syntax
Parameters
None
Returns
Array of guild objects with properties:
id (string) - Guild ID
name (string) - Guild name
icon (string) - Icon hash
owner_id (string) - Owner user ID
member_count (number) - Total member count
description (string) - Guild description
- And more guild properties
Returns empty array if failed.
Example
ethone.on_command("guilds", "List guilds", "guilds", function(ctx) {
var guilds = discord.fetch_guilds();
var names = guilds.map(function(g) { return g.name; }).join(", ");
discord.send_message(ctx.channel.id, "Guilds: " + names);
});
discord.fetch_friends()
Get all friends/relationships. Note: Relationships are tracked via events and may not be fully available through this function.
Syntax
Parameters
None
Returns
Array of relationship objects (currently returns empty array - use relationship events instead).
Example
var friends = discord.fetch_friends();
ethone.log("Friend count: " + friends.length);
discord.fetch_channel_history()
Get message history from a channel.
Syntax
discord.fetch_channel_history(channelId, limit?, beforeId?)
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 ID
content (string) - Message content
author_id (string) - Author user ID
author (string) - Author username
channel_id (string) - Channel ID
guild_id (string) - Guild ID
timestamp (string) - Message timestamp
embeds (array) - Message embeds
attachments (array) - Message attachments
Returns empty array if failed.
Example
ethone.on_command("history", "Get channel history", "history [limit]", function(ctx) {
var limit = ctx.args.length > 0 ? parseInt(ctx.args[0]) : 10;
var messages = discord.fetch_channel_history(ctx.channel.id, limit);
discord.send_message(ctx.channel.id, "Last " + messages.length + " messages fetched");
});
discord.fetch_guild_channels()
Get all channels in a guild.
Syntax
discord.fetch_guild_channels(guildId)
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
ethone.on_command("channels", "List channels", "channels", function(ctx) {
var channels = discord.fetch_guild_channels(ctx.guild.id);
var textChannels = channels.filter(function(c) { return c.type === 0; });
var names = textChannels.map(function(c) { return c.name; }).join(", ");
discord.send_message(ctx.channel.id, "Text channels: " + names);
});
discord.fetch_guild_members()
Get members from a guild.
Syntax
discord.fetch_guild_members(guildId, limit?, afterId?)
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 nickname
roles (array) - Array of role IDs
joined_at (string) - Join timestamp
Returns empty array if failed.
Example
ethone.on_command("members", "List members", "members [limit]", function(ctx) {
var limit = ctx.args.length > 0 ? parseInt(ctx.args[0]) : 10;
var members = discord.fetch_guild_members(ctx.guild.id, limit);
var names = members.map(function(m) { return m.user.username; }).join(", ");
discord.send_message(ctx.channel.id, "Members: " + names);
});
discord.fetch_guild_roles()
Get all roles in a guild.
Syntax
discord.fetch_guild_roles(guildId)
Parameters
| Parameter | Type | Description |
|---|
guildId | string | Guild ID |
Returns
Array of role objects with properties:
id (string) - Role ID
name (string) - Role name
color (number) - Role color
hoist (boolean) - Display separately
position (number) - Role position
permissions (string) - Permission bits
managed (boolean) - Managed by integration
mentionable (boolean) - Can be mentioned
Returns empty array if failed.
Example
ethone.on_command("roles", "List roles", "roles", function(ctx) {
var roles = discord.fetch_guild_roles(ctx.guild.id);
var names = roles.map(function(r) { return r.name; }).join(", ");
discord.send_message(ctx.channel.id, "Roles: " + names);
});
discord.fetch_pinned_messages()
Get pinned messages from a channel.
Syntax
discord.fetch_pinned_messages(channelId)
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
ethone.on_command("pins", "Show pinned messages", "pins", function(ctx) {
var pinned = discord.fetch_pinned_messages(ctx.channel.id);
discord.send_message(ctx.channel.id, "Pinned messages: " + pinned.length);
});
discord.fetch_invites()
Get all invites for a guild.
Syntax
discord.fetch_invites(guildId)
Parameters
| Parameter | Type | Description |
|---|
guildId | string | Guild ID |
Returns
Array of invite objects with properties:
code (string) - Invite code
guild_id (string) - Guild ID
channel_id (string) - Channel ID
uses (number) - Current uses
max_uses (number) - Maximum uses
max_age (number) - Max age in seconds
temporary (boolean) - Temporary membership
Returns empty array if failed.
Example
ethone.on_command("invites", "List invites", "invites", function(ctx) {
var invites = discord.fetch_invites(ctx.guild.id);
var codes = invites.map(function(i) {
return i.code + " (" + i.uses + "/" + i.max_uses + ")";
}).join(", ");
discord.send_message(ctx.channel.id, "Invites: " + codes);
});
discord.fetch_guild_bans()
Get all bans in a guild.
Syntax
discord.fetch_guild_bans(guildId)
Parameters
| Parameter | Type | Description |
|---|
guildId | string | Guild ID |
Returns
Array of ban objects with properties:
user (object) - Banned user object
reason (string) - Ban reason
Returns empty array if failed.
Example
ethone.on_command("bans", "List bans", "bans", function(ctx) {
var bans = discord.fetch_guild_bans(ctx.guild.id);
var users = bans.map(function(b) { return b.user.username; }).join(", ");
discord.send_message(ctx.channel.id, "Banned users: " + users);
});
discord.search_guild_members()
Search guild members by username or nickname.
Syntax
discord.search_guild_members(guildId, query, limit?)
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
ethone.on_command("find", "Find member", "find <username>", function(ctx) {
if (ctx.args.length < 1) {
discord.send_message(ctx.channel.id, "Usage: .find <username>");
return;
}
var members = discord.search_guild_members(ctx.guild.id, ctx.args[0]);
if (members.length > 0) {
var names = members.map(function(m) { return m.user.username; }).join(", ");
discord.send_message(ctx.channel.id, "Found: " + names);
} else {
discord.send_message(ctx.channel.id, "No members found");
}
});
discord.join_guild()
Join a Discord server using an invite code. Uses custom TLS fingerprinting for enhanced stealth.
Syntax
discord.join_guild(inviteCode)
Parameters
| Parameter | Type | Description |
|---|
inviteCode | string | Discord invite code or full invite URL |
The function accepts either:
- 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 successful
guild_id (string, optional) - ID of the joined guild
guild_name (string, optional) - Name of the joined guild
error (string, optional) - Error message if failed
code (number, optional) - HTTP status code if failed
Example
ethone.on_command("join", "Join server", "join <invite>", function(ctx) {
if (ctx.args.length < 1) {
discord.send_message(ctx.channel.id, "Usage: .join <invite>");
return;
}
var result = discord.join_guild(ctx.args[0]);
if (result.success) {
var msg = "Joined server!";
if (result.guild_name) {
msg += " (" + result.guild_name + ")";
}
discord.send_message(ctx.channel.id, msg);
} else {
discord.send_message(ctx.channel.id, "Failed: " + result.error);
}
});
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