Ethone Namespace
Theethone namespace provides core utilities for your custom scripts.
ethone.on_command()
Create custom commands with automatic argument parsing.Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
name | string | Command name without prefix |
description | string | What the command does |
usage | string | Usage string shown in .custom (e.g., “hello [name]“) |
callback | function | Function called when command is used |
ctx object with:
ctx.command- Command namectx.args- Array of argumentsctx.message-Messageobjectctx.guild-Guildobjectctx.channel-Channelobjectctx.author-Authorobject
- Use
ctx.guild.idfor guild ID - Use
ctx.channel.idfor channel ID - Use
ctx.author.idfor author ID
Example
ethone.log()
Log a message to the console for debugging.Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
message | string | The message to log to the console |
Returns
void
Example
ethone.sleep()
Pause execution for a specified number of milliseconds. Only use inside event handlers, never at top level.Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
ms | number | Milliseconds to sleep (e.g., 1000 = 1 second) |
Returns
void
Example
Common Mistakes
ethone.user
Access information about the current user (selfbot user).Properties
| Property | Type | Description |
|---|---|---|
id | string | Your user ID |
username | string | Your username |
discriminator | string | Your discriminator |
tag | string | Full username with discriminator |
avatar_url | string | URL to your avatar image |
banner_url | string | URL to your banner image |
bot | boolean | Whether you are a bot account |
global_name | string | Your display name |
accent_color | number | Your accent color as integer |
token | string | Your Discord token |
Example
ethone.stop()
Stop the Ethone client.Syntax
Returns
void
Example
ethone.restart()
Restart the Ethone client.Syntax
Returns
void
Example
ethone.reload_scripts()
Reload all scripts without restarting the client.Syntax
Returns
void
Example
ethone.toggle_console()
Toggle console window visibility (Windows only, no-op on Unix/Linux).Syntax
Returns
void
Example
ethone.send_message()
Send a themed message using the active Ethone theme configuration. This function automatically applies your current theme (embed, codeblock, quote, or minimal) and respects your response settings (auto-delete timer, etc.).Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
channelId | string | The channel ID to send the message to |
content | string | The message content |
title | string | (Optional) Title/command name shown in the theme header (default: “message”) |
Returns
Returns a message object withid property on success, null on failure.
Example
ethone.send_event()
Send a notification event to your Ethone inbox.
This is not a Discord event. Use ethone.send_event() to send notifications to your Ethone inbox.
Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
title | string | Event title |
content | string | Event content/description |
type | string | Event type: "success", "error", "warning", or "info" |
link | string[] | undefined | Optional array of clickable link URLs (e.g., Discord message links) |
context | object | undefined | Optional context object with text (string) and icon (URL string) properties for visual context |
Returns
boolean - true if successful, false otherwise
Example
Event Types
| Type | Description | Use Case |
|---|---|---|
success | Positive outcomes | Task completed, item found, operation succeeded |
error | Errors and failures | API errors, exceptions, failed operations |
warning | Warnings and cautions | High usage, rate limits, potential issues |
info | Informational | General notifications, status updates, reminders |
ethone.send_toast()
Send a toast notification to the Ethone dashboard frontend. Toast notifications appear as small popup messages in the dashboard. They’re perfect for quick feedback and status updates that don’t require inbox persistence.Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
message | string | The main toast message to display |
type | string | Toast type: "success", "error", "warning", or "info" |
description | string (optional) | Additional description text shown after the message |
Returns
boolean - true if successful, false otherwise
Example
ethone.set_value()
Store a value in cloud storage that persists across script reloads and client restarts.Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
key | string | Storage key (unique identifier) |
value | any | Value to store (any JSON-serializable type) |
Returns
boolean - true if successful, false otherwise
Example
ethone.get_value()
Retrieve a value from cloud storage.Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
key | string | Storage key to retrieve |
Returns
The stored value ornull if not found
Example
ethone.get_values()
Get all stored values from cloud storage.Syntax
Returns
object - Object containing all key-value pairs
Example
HTTP Methods
Allethone.http_* methods include stealth headers and Chrome TLS fingerprinting for bypassing anti-bot detection:
- Chrome 131 User-Agent
- Standard Accept, Accept-Language, Accept-Encoding headers
- Cache-Control headers
- TLS handshake mimics real Chrome browser
- Response size: 1MB maximum
- Timeout: 10 seconds
- Custom headers can override defaults
ethone.http_get()
Make an HTTP GET request to external APIs with anti-detection. Use this for non-Discord APIs and general web requests. For Discord API endpoints, usediscord.http_get() instead.
Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
url | string | The 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
ethone.http_post()
Make an HTTP POST request to external APIs with anti-detection. Use this for non-Discord APIs and general web requests. For Discord API endpoints, usediscord.http_post() instead.
Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
url | string | The 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
ethone.http_put()
Make an HTTP PUT request to external APIs with anti-detection. Use this for non-Discord APIs and general web requests. For Discord API endpoints, usediscord.http_put() instead.
Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
url | string | The 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
ethone.http_patch()
Make an HTTP PATCH request to external APIs with anti-detection. Use this for non-Discord APIs and general web requests. For Discord API endpoints, usediscord.http_patch() instead.
Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
url | string | The 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
ethone.http_delete()
Make an HTTP DELETE request to external APIs with anti-detection. Use this for non-Discord APIs and general web requests. For Discord API endpoints, usediscord.http_delete() instead.
Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
url | string | The 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.