Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
MinecraftDiscord/templates/customTemplate.py
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
executable file
16 lines (11 sloc)
638 Bytes
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
def customCode(inputMessage): | |
prefix = os.environ['PREFIX'] #This gets the prefix | |
if not inputMessage[:len(prefix)]: #Checks to see if the prefix is at the start of the message | |
return #If it isn't, ignore the rest of the code | |
'''Do not modify any code above this''' | |
if message == "example": | |
message = "This is an example of the custom code you can write" | |
elif message == "example2" | |
message = "This is also an example of the custom code you can write" | |
'''Do not modify any code below this''' | |
return message #Send the message back to the main program |