Presets
Preset Configuration Guide
The presets.json
file is used to define various embed configurations for your Discord bot. Each preset includes specific properties to customize how the embed looks and behaves.
Structure of presets.json
presets.json
The presets.json
file contains multiple presets, each identified by a unique key. Here's a breakdown of the components used in each preset:
Key Components
Preset Name:
Each preset is identified by a unique key (e.g.,
link_button_example
,dm_button_example
). This key is used to reference the preset in the bot's code.
Title:
The
title
property sets the title of the embed message.Example:
"title": "Welcome to Our Server!"
Description:
The
description
property provides the main content or message of the embed.Example:
"description": "We're glad you're here. This embed showcases all three button types in one message."
Color:
The
color
property sets the color of the embed sidebar using a hexadecimal color code.Example:
"color": "#3498db"
Footer:
The
footer
property adds a footer text to the embed, typically for additional information or context.Example:
"footer": "Click the button below to visit our website"
Thumbnail:
The
thumbnail
property adds a small image to the top right of the embed, typically a logo or icon.Example:
"thumbnail": "https://example.com/logo.png"
Buttons:
The
buttons
array defines interactive buttons attached to the embed. Each button has several properties:label: The text displayed on the button.
type: The action type of the button. Possible values include
Link
,DirectMessage
, andReactionRole
.style: The button's visual style. Common styles are
Primary
,Secondary
,Success
,Danger
, andLink
.url: (For
Link
type) The URL that the button will open.customId: (For
DirectMessage
andReactionRole
types) A unique identifier for the button action.message: (For
DirectMessage
type) The message content to be sent via DM.roleID: (For
ReactionRole
type) The ID of the role to be assigned to the user.DM: (For
ReactionRole
type) Boolean to send a DM notification to the user upon role assignment.
Example Preset
Here is an example preset from the file that demonstrates how to create a simple embed with a link button:
Creating a New Preset
To create a new preset, follow these steps:
Define a unique key for your preset. This key will be used in the bot code to reference the preset.
Set the title and description to describe what the embed is for.
Choose a color for the embed's sidebar using a hex code.
Add a footer and thumbnail if desired.
Define buttons in the
buttons
array with appropriate actions:For a link button, provide the URL.
For a DM button, specify the message content.
For a reaction role button, specify the role ID and whether to send a DM.
By following this structure and using the provided examples, you can create customized presets that suit your server's needs and enhance interactions with members.
Last updated