![]() ![]() Please also open an issue for any new features you would like to see added. You should open an issue with details of the problem and how to reproduce if possible. If you find any bugs, issues, or unexpected behaviour while using the library, respond ( "Pong!" ) # Run the bot # Note that this is blocking meaning no code after this line will run # until the bot is shut off bot. Context ) -> None : # Send a message to the channel the command was used in await ctx. The callback should take a single argument which will be # an instance of a subclass of when passed in async def ping ( ctx : lightbulb. ![]() PrefixCommand ) # Define the command's callback. command ( "ping", "checks the bot is alive" ) # Define the command type(s) that this command implements. command # Use the command decorator to convert the function into a command. BotApp ( token = "your_token_here", prefix = "your_prefix_here" ) # Register the command to the bot. Usage # Import the command handler import lightbulb # Instantiate a Bot instance bot = lightbulb. Use the package manager pip to install Lightbulb. This library aims to make it simple for you to make your own Discord bots and provideĪll the utilities and functions you need to help make this job easier. Lightbulb is designed to be an easy to use command handler library that integrates with theĭiscord API wrapper library for Python, Hikari. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |