dpymenus contains a working example for almost every feature most developers will be using. All the examples run as separate cogs on a bot that you can load up yourself.
All of these instructions should work on Linux (Ubuntu-flavors) & Windows 10.
Windows can be pretty finicky with PATH and Python installations sometimes. If you are having issues installing Poetry, ensure that your PATH contains a
In addition, you probably want to go into App Execution Aliases and turn off any options relating to Python and install Python from python.org.
In your command line (PowerShell if you are on Windows):
Clone the repository.
git clone https://github.com/robertwayne/dpymenus
Move into the directory you just cloned.
We need to create a
.envfile and add a token to it.
echo "DPYMENUS_BOT_TOKEN=your_private_token_here" > .env
Due to the way Windows creates new files, the simplest solution is to just create a .env in VSCode or your IDE of choice. Using the above will cause you to receive an encoding error, as the file will not be in UTF-8.
Install Poetry and the project dependencies.
pip -m install poetry && poetry install
Please note that this is not the preferred way to install Poetry. Instead, you should follow the guide on their site. I highly recommend Poetry as a package manager for Python, so it is not wasted effort to download and learn properly.
Run the bot!
poetry run examples
At this point, the bot should be up and running. All the cogs are loaded automatically thanks to cogwatch, so you can add the bot to your server and start using commands.