relopark.blogg.se

Discordapp bot
Discordapp bot




discordapp bot

If you don't have it, you can generate a new one by visiting /applications, selecting your bot application, selecting "Bot" from the side menu, and clicking "Reset Token". The Discord token is the token you copied when creating your bot from the Discord guide. If you didn't subscribe before, you'll need to now to get hold of the token. Visit /account to copy and paste your Replicate API token. Paste in the following: REPLICATE_API_TOKEN=

discordapp bot

This text file will be used to store secrets for your development environment. Then add dependencies: poetry add discord.py python-dotenv replicateĬreate a file named. Install the poetry command-line tool and create a new pyproject.toml file: poetry init -n Next you'll define some of the Python package dependencies needed by your project. Create a project directory mkdir stable-diffusion-bot 🐇 Want to skip ahead? If you'd rather not copy and paste all the code below, then you can clone the replicate/replicate-discord-bot GitHub repo to start with a working project template. This section walks you through steps required to set up a codebase. In the second half of the guide – inviting your bot – when it tells you to "tick the permissions required for your bot to function", you'll want to give the bot permission to "Send messages". That permission is needed for your bot to read the content of messages, to get the prompts! At the end of the first section, you'll need to turn on the "message content intent" option on the bot page. Give it a name like stable-diffusion-bot. You'll be prompted to enter your credit card information and billed by the second for the predictions you run.įollow discord.py's guide to set up a Discord Bot account. Terminal on Mac, gnome-terminal on Linux, or PowerShell on Windows)






Discordapp bot