LogoSynergy

Sapphire Messages via buttons

Messages via buttons

In this guide, we will create a button on a message that will send a message to the channel when someone clicks the button.

Sapphire Messages via buttons Example


1) Create a message template

Go to the Message Template page from Messages menu on Sapphire dashboard and create a new template by clicking the "Create new template" button.

Sapphire Messages via buttons Create a message template

Note

We will call this template as "Main Message" because it's the one that has button. When someone clicks the button, it sends a message on the channel.


2) Design your Main Message

For this guide, we will design a simple server welcome message which will have a button called "Rules"

Sapphire Messages via buttons Design your Main Message


3) Add the Button to the Main Message

Click the "+ Action Row" to add an action row in the message template. Then click the "+ Button" to add a button.

Sapphire Messages via buttons Add the Button to the Main Message


4) Configure the Button on Message Template

Click the ⚙ on the button, then click "Select an action".

Sapphire Messages via buttons Configure the Button on Message Template


5) Create a New Action

If you've already created any button components, they'll appear in the actions list. Since we haven't created any components yet, we'll see an option to create a new button component.

Click on "New action" to create a new button component.

Sapphire Messages via buttons Create a New Action


6) Enter a name for your Button Component

Type in a name for your button component and click the ✅. This will make a new button component and link it to this button.

Sapphire Messages via buttons Enter a name for your Button Component


7) Create another message template

Create a new message template, just like we did in step 1. Sapphire will send this template when someone clicks the button.

For this guide, we will create a button to display the server rules. So, I have created a new message template and entered the server rules.

Sapphire Messages via buttons Create another message template


8) Locate your button component

Go to the Components page from Messages menu on Sapphire dashboard and click on the button name we created earlier.

Sapphire Messages via buttons Locate your button component

Note

The Button Component will be automatically created on the components page because we created it from the message template editor on step 6

9) Add actions to your button component

Click the + icon and it will show you a list of all actions you can add to your button.

Choose the action Send Message

Sapphire Messages via buttons Add actions to your button component


10) Configure the Action of Button Component

Click the ⚙ icon on the Send Messages action and choose the template you want to send when someone clicks the Button

Sapphire Messages via buttons Configure the Action of Button Component


11) Enable EPHEMERAL Option

Enable the option called EPHEMERAL, this will make the message only visible to the person who clicks the button

Sapphire Messages via buttons Enable EPHEMERAL Option


12) Send the Main Message

Go to the Message Template page from Messages menu on Sapphire dashboard and open the message template we created on step 1.

Then go to the Use menu on the template editor.

Once you are in the Use menu, select a channel (where you want to send the message with the button) and click the send message button.

Sapphire Messages via buttons Main Message Sending


Final Result

Sapphire Messages via buttons


Video Tutorial

If any step didn't make sense or you got stuck, you can watch a tutorial video by clicking here

Support

If you need any help then feel free to join our community server or sapphire support server and create a post on the support channel.