1
Fork 0
mirror of https://github.com/allthingslinux/tux.git synced 2024-10-03 00:53:12 +00:00

Merge pull request #83 from allthingslinux/kzndotsh-patch-1

Update linting.yml
This commit is contained in:
kzndotsh 2024-03-24 16:14:57 -04:00 committed by GitHub
commit f8d520a9cb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,23 +1,23 @@
""" """
Discord Bot Event Handler Template Discord Bot Event Handler Template
This example contains a template for creating new event handlers for Tux. It is designed to be have a This example contains a template for creating new event handlers for Tux. It is designed to be have a
familiar and straightforward command structure, with each event being able to have its own function. familiar and straightforward command structure, with each event being able to have its own function.
Link to discord.py event reference: Link to discord.py event reference:
https://discordpy.readthedocs.io/en/latest/api.html#event-reference https://discordpy.readthedocs.io/en/latest/api.html#event-reference
To use this template, replace `EventName` with the name of your event handler class. To use this template, replace `EventName` with the name of your event handler class.
Replace `@commands.command` sections and their respective functions with the commands you Replace `@commands.command` sections and their respective functions with the commands you
wish to create. Refer to the given 'hello' command as an example. wish to create. Refer to the given 'hello' command as an example.
For each command, ensure that you have: For each command, ensure that you have:
1. A name parameter that defines the command's call sign (i.e., the string that must be typed 1. A name parameter that defines the command's call sign (i.e., the string that must be typed
out to call the command). out to call the command).
2. A help parameter that succinctly but clearly describes what the command does. This 2. A help parameter that succinctly but clearly describes what the command does. This
description will be displayed in the bot's help command. description will be displayed in the bot's help command.
3. Refer to the given 'on_message' listener as an example for creating event listeners. 3. Refer to the given 'on_message' listener as an example for creating event listeners.
4. Remember to properly use the TuxLogger for outputting events to console and files. For 4. Remember to properly use the TuxLogger for outputting events to console and files. For
example: example:
- logger.info("This is an information message.") - logger.info("This is an information message.")
- logger.warning("This is a warning message.") - logger.warning("This is a warning message.")