Project Scripting Documentation
π¦ Allowed Imports
β
Standard Library
asyncioossyswebbrowserloggingdataclassestypingtimerejsondatetimerandom
β
Third-party Packages
discord(fromdiscord.py)discord.extaiohttp
β
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.Contextor 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 incodemode, 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.Clientinstance
Returns:
discord.Guildobject
Raises:
Exceptionif 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
sendSends 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:
Trueon success (204 No Content)Falseon failure or invalid URL
ποΈ delete
deleteDeletes a webhook.
Parameters:
url: Discord webhook URL
Returns:
Trueon successful deletionFalseif 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=Trueto filter unread ones
Marks a single notification as read
Marks all notifications as read
Deletes all stored notifications
Last updated