Package: dismake
Introduction to DismakeDismakeis a robust framework designed to assist you in developing stateless and independent Discord bots that employ Slash Commands. The framework is built on top of theFastAPI, a high-performance Python web framework, making it easy to use, efficient, and speedy.☢️ PrerequisitesDismake requires Python 3.9 or later versions to work correctly.Discord Bot token🏁 Getting Started with DismakeBefore you start using Dismake, you'll need to create a new Discord application and add a bot to it.💻 InstallingTo install Dismake, use the following command to install it directly from PyPI:pipinstalldismake🤖 Creating a Minimal Discord Bot with DismakeLet's create a basic bot that echoes user text back to them.Create a new Python file namedmain.py, and copy and paste the following code:importdismakefromdismakeimportcommandsimporttypingapp=dismake.Bot(...)@app.event('ready')asyncdefready_event():print(f"Logged in as{app.user}.")@app.command(name="echo",description="A simple echo command.")asyncdefecho_command(ctx:dismake.Context,text:typing.Annotated[str,commands.Option(name="text",description="Type something"),type=str]):awaitctx.respond(f"{text}")if__name__=="__main__":app.run(app="main:app",reload=True)The code above demonstrates how to use Dismake to create a basic Discord bot that responds to slash commands.Here's a brief explanation of what each part of the code does:The first line imports the Dismake library. Make sure you've installed Dismake before you run the code.Next, we create a new instance of theDismake.Botclass, which serves as our connection to Discord.We register an event using theDismake.Bot.event()decorator. This library provides numerous events, and we use this callback to perform asynchronous operations once the bot is logged in.We register a slash command using theDismake.Bot.command()decorator. This decorator requires the command's name and description as arguments.In the function that handles the command, we use the Dismake.Context object to interact with Discord. We take the user's input text and echo it back to them.Finally, we use theapp.run()method to start the bot. We've named our bot app in this example. The second argument,reload=True, instructs Uvicorn to reload the app automatically when changes are made to the code.To run the bot, open the terminal, navigate to the directory containingmain.py, and enter the following command:pythonmain.pyYou can now experiment with your basic bot.✨ FeaturesEasy-to-use and intuitive framework for building Discord bots with Slash CommandsBuilt on top of the FastAPI web framework, providing a high-performance and efficient backendFully customizable with support for middleware, extensions, and custom context classesSupports easy integration with databases, message queues, and other external servicesProvides a convenient and powerful way to define and manage Slash Commands and their optionsIncludes built-in command validation and error handling for cleaner and more maintainable code📖 DocumentationFor detailed usage and installation instructions, please check out the officialDismake documentation🏥 SupportIf you have any questions or issues with Dismake, please feel free to reach out to us on theDiscord server.🗺️ RoadmapFor details about our roadmap, please check out ourRoadmap page.🤝 ContributingWe welcome contributions from anyone! If you want to contribute to Dismake, please follow these guidelines:• Contributing to the DocumentationThe documentation is generated withNextra. If you want to contribute to the documentation, please do the following:Clone the repository.Navigate to the/docsdirectory.Runnpm installto install the required dependencies.Runnpm run devto start the development server.Make your changes, push and create a pull request.• Contributing to the Dismake PackageIf you want to contribute to the Dismake package or report an issue, please do the following:Fork the repository.Make your changes.Format your codeTest your code & push.Create a pull request.Thank you for contributing!🪪 LicenseDismake is released under theMIT License. See theLICENSEfile for more details.