-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Annika
committed
May 25, 2020
1 parent
c27d19c
commit a093d04
Showing
4 changed files
with
40 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
############## module_template.py ############# | ||
## serves as a template for the Module class ## | ||
## to base other module files off of ## | ||
## by Annika ## | ||
############################################### | ||
|
||
class Module: | ||
"""Represents a module, which may contain several commands | ||
""" | ||
def __init__(self): | ||
self.commands = {"command": self.exampleCommand, "alias": self.exampleCommand, "ping": self.exampleCommand} | ||
|
||
def exampleCommand(self, message): | ||
"""Example command: replies "Pong!" | ||
Arguments: | ||
message {Message} -- the Message object that invoked the command | ||
""" | ||
message.respond("Pong!") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters