This section revolves around simple Serenity examples you can get quickly started with by following these 4 steps:Documentation Index
Fetch the complete documentation index at: https://docs.shuttle.dev/llms.txt
Use this file to discover all available pages before exploring further.
- Go through the steps in Prerequisites below
- Initialize a new Serenity project by running the
shuttle init --template serenitycommand - Copy pasting the contents of the example you want to deploy — make sure to check the tabs of the snippet(s) to ensure you are copying the right code/file
- Running the
shuttle deploycommand
Prerequisites
To get started log in to the Discord developer portal.- Click the New Application button, name your application and click Create.
- Navigate to the Bot tab in the lefthand menu, and add a new bot.
- On the bot page click the Reset Token button to reveal your token. Put this token in your
Secrets.toml. It’s very important that you don’t reveal your token to anyone, as it can be abused. Create a.gitignorefile to omit yourSecrets.tomlfrom version control. - For the sake of this example, you also need to scroll down on the bot page to the Message Content Intent section and enable that option.
- On your bot’s application page, open the OAuth2 page via the lefthand panel.
- Go to the URL Generator via the lefthand panel, and select the
botscope as well as theSend Messagespermission in the Bot Permissions section. - Copy the URL, open it in your browser and select a Discord server you wish to invite the bot to.
Code
This example shows how to build a Serenity bot with Shuttle that responds to the!hello command with world!.

