This template provides a Discord bot created in Python that enables users to generate and utilize text commands. Users can interact with this bot by employing the !addCommand feature, in the format; "!addCommand ! ". At present only custom text commands with tailored text responses are compatible with this bot.
Welcome to the guide on using the Custom Commands Bot Discord template on Lazy. This template enables you to establish a Discord bot of learning and responding with customized text commands. It's a way to add a touch to your Discord server without requiring coding expertise.
To initiate use of this template simply select "Start with this Template" within the Lazy platform. This action will automatically populate the code in the Lazy Builder interface eliminating the need for code copying or pasting.
Before utilizing the bot you must configure an environment, for the Discord bot token. Follow these steps to obtain and configure your Discord bot token;
1. Visit the Discord Developer Portal. Establish an application.
Under the "Bot" section simply click on "Add Bot" to generate a bot user. Remember to save the token provided for your bot. In the Lazy Builder head over to the Environment Secrets tab. Create a secret labeled as `DISCORD_BOT_TOKEN`. Paste the copied token, as its value. To test it out just hit the Test Button.
2. Once you've set up your environment secret give the "Test" button in the Lazy Builder a push. This action will kickstart the deployment process of your Discord bot. Open up the Lazy CLI. No further input from you will be required at this point.
Following deployment your Discord bot will be up. Running for you to utilize. To introduce a personalized command employ the `!. Feature, in your Discord server using this structure;
!addCommand !. Your unique response goes here
For instance if you wish for the bot to reply with "Hello, world!" upon someone typing `!greet` simply input;
!addCommand !greet Hello, world!
When someone types `!greet`, on your Discord server the bot will greet them with a Hello, world!"
If you plan to use this bot on different platforms or interfaces you might have to share the server link or API endpoints, for the bot. However this specific setup doesn't require those integrations. Its tailored for Discord. Doesn't offer an API or front end interface.
Just remember all these steps are carried out on the Lazy platform so you won't have to deal with installing libraries or configuring your environment. Lazy takes care of everything for you ensuring a process.
Have fun personalizing your Discord server with your bot!