Welcome to the Discord Member Engagement Bot Template! This bot is designed to help you track and measure user engagement within your Discord server. It counts unique engaged users, new members, and members who have left, and sends these metrics to a designated Slack channel every week. This article will guide you through the process of setting up and using this template on the Lazy platform.
To begin using the Discord Member Engagement Bot Template, click on the "Start with this Template" button. This will initialize the template within the Lazy Builder interface, pre-populating the code necessary for the bot's functionality.
Before you can use the bot, you'll need to set up a few environment secrets that the bot requires to function properly. These are the DISCORD_TOKEN, SLACK_API_TOKEN, and SLACK_CHANNEL. Here's how to acquire these values:
Once you have these values, enter them into the Environment Secrets tab within the Lazy Builder.
After setting up the environment secrets, press the "Test" button to deploy the app. The Lazy CLI will handle the deployment, and you won't need to install any libraries or set up your environment.
Analyze the code to see if the bot requires user input through the CLI. In this case, the bot does not require any additional user input, so you can skip this step.
There is no frontend experience for this app, as its primary function is to operate in the background of your Discord server and send messages to Slack. Therefore, there is no interface to interact with directly within the app.
After testing and confirming that the bot is running correctly, you'll need to invite the bot to your Discord server using the OAuth2 URL generated in the Discord Developer Portal. Ensure that you grant the bot the necessary permissions to read messages and track member events.
For Slack integration, make sure that your Slack app has the necessary permissions to post messages to the channel you've specified. You can adjust these permissions in the Slack app settings under 'OAuth & Permissions'.
Once the bot is added to your Discord server and configured in Slack, it will begin tracking engagement metrics and sending weekly updates to your Slack channel automatically.
If you encounter any issues or need further assistance, refer to the documentation provided by Discord and Slack for creating bots and apps, respectively.
Discord Bot Documentation: https://discord.com/developers/docs/intro
Slack API Documentation: https://api.slack.com/
By following these steps, you should now have a fully functional Discord Member Engagement Bot running on the Lazy platform, providing valuable insights into your server's engagement directly to Slack.