Entry points

When creating a new bot from scratch, it is important to select the appropriate entry point, which will determine how the bot is triggered to perform its intended task. In this section, we will provide an overview of the different entry point options available.

User joins Discord: will cause the bot to execute only when a new user joins the server. This option is useful for automating onboarding processes for new members, such as assigning initial roles and sending welcome messages.

User clicks on a button: will trigger the bot to execute only when a user clicks on a designated button. This option is ideal for use cases where a user needs to initiate a process, such as starting a survey or poll by clicking on a "Start survey" button in a public channel.

Member's role is changed: will execute the bot only when certain roles are added or removed from a member's account.

By clicking on the root block you will be able to choose the roles that will trigger the bot:

User invokes a slash command: will trigger the bot to execute only when a custom slash command is typed. For instance, if a user types "/quiz," the bot will start running the quiz. This option is suitable for use cases where users need to interact with the bot through specific commands to initiate a process.

By clicking on the root block you will be able to type the command name:

External event is received: This is a paid feature, contact us to discuss your specific use case.

By understanding the differences between these entry point options, you can select the best one for your intended use case and ensure that your bot performs the desired actions efficiently.

When testing any flow in your bot, regardless of the entry point selected, you can click on the "Test" button to initiate the test. Once clicked, a button will be sent to the #dots-admins channel, which can be used to trigger the flow that was just created.

For instance, when creating a new slash command for your server, testing it involves clicking the button instead of typing the command. It is important to note that the command will only be available after publishing the bot. In this case, any testing will be initiated through the button provided, and the same principle applies to any other entry point.

Testing your bot frequently as you edit it and add new blocks, you can be confident that your bot will execute as intended, and any issues or bugs can be easily identified and resolved.

Last updated