Project Scripting Documentation
📦 Allowed Imports
✅ Standard Library
asyncio
os
sys
webbrowser
logging
dataclasses
typing
time
re
json
datetime
random
✅ Third-party Packages
discord
(fromdiscord.py
)discord.ext
aiohttp
✅ Project Imports
🔗 Import from:
Creates a pseudo-embed message using formatting, images, or ANSI-styled code blocks. Supports multiple modes for flexibility and automatic deletion.
Signature
Parameters
ctx
: Discord context object (commands.Context
or similar)content
: Main message bodymode
: One of"auto"
,"plain"
,"code"
,"image"
, or"just_image"
title
: Optional title for embed-like layoutfields
: Optional list of(name, value)
pairsfooter
: Optional footer stringdelete_after
: Time in seconds to auto-delete the message(s)attachments
: List of files to attachcode_lang
: Code language (used only incode
mode, default isansi
)
Modes
auto
: Usesconfig.General["Embed Mode"]
to determine style.plain
: Renders content in rich text.code
: Uses ANSI formatting and boxed layout.image
: Converts content and fields into an image.just_image
: Sends content as a pure image.
Returns
A list of additional messages sent (if the original had to be split)
Notes
Messages are chunked and sent individually if too long.
Supports temporary messages via
delete_after
.
🔍 fetch_guild
Function
fetch_guild
FunctionFetches a Discord guild using a connected discord.Client
.
Parameters:
id
(int, optional) – Guild IDname
(str, optional) – Guild nameclient
– Connecteddiscord.Client
instance
Returns:
discord.Guild
object
Raises:
Exception
if neither ID nor name is provided, or no guild is found
🌐 DiscordWebhook
Class
DiscordWebhook
Class🔗 Import from:
Asynchronous manager for sending and deleting Discord webhook messages, with built-in rate limiting and error handling.
📤 send
send
Sends a message to the webhook URL.
Accepted message
formats:
message
formats:str
: treated as plain contentWebhookMessage
: custom dataclassdiscord.Embed
: automatically wrappeddict
: used as-is
Parameters:
url
: Discord webhook URLmessage
: message payloadretries
: retry attempts on failure
Returns:
True
on success (204 No Content
)False
on failure or invalid URL
🗑️ delete
delete
Deletes a webhook.
Parameters:
url
: Discord webhook URL
Returns:
True
on successful deletionFalse
if the URL is invalid or deletion fails
⚙️ Configuration System
🔗 Import from:
Config Sections
All sections behave like dictionaries and are accessed as:
Available Sections:
config.General
config.General["Token"]
config.Notifications
config.Notifications["Enable Toasts"]
config.Snipers
config.Snipers["Nitro"]["Enabled"]
config.Loggers
config.Loggers["DM"]["Enabled"]
config.Embeds
config.Embeds["Deletion Delay"]
config.RPC
config.RPC["AppID"]
🧾 Logger
🔗 Import from:
Handles logging of system events with optional in-app notifications.
Logging Levels:
Parameters:
message
: Main log stringdetails
: Additional context (optional)notify
: IfTrue
, creates a notification
🔔 Notification API
Returns list of notifications, newest first
Set
unread_only=True
to filter unread ones
Marks a single notification as read
Marks all notifications as read
Deletes all stored notifications
Last updated