Initial commit
This commit is contained in:
commit
250df44778
9 files changed
+240
No files matched your search
@@ -0,0 +1 @@
|
||||
__pycache__/
|
||||
@@ -0,0 +1,31 @@
|
||||
import re
|
||||
|
||||
def pluginStart():
|
||||
print(f"Starting '{__name__}'")
|
||||
|
||||
def genericHooks():
|
||||
print(f"Starting '{__name__}'")
|
||||
funcList = ["test1"]
|
||||
print(f"Registering hooks {funcList}")
|
||||
return [__name__,funcList]
|
||||
|
||||
def messageHooks():
|
||||
funcList = ["onMessage"]
|
||||
print(f"Registering hooks {funcList}")
|
||||
return [__name__,funcList]
|
||||
|
||||
def mentionHooks():
|
||||
funcList = ["onMention"]
|
||||
return [__name__,funcList]
|
||||
|
||||
def test1():
|
||||
internalFunc("test")
|
||||
|
||||
def internalFunc(name):
|
||||
print(f"Looks like this works running from: {name}")
|
||||
|
||||
def onMessage(msg):
|
||||
pass
|
||||
|
||||
def onMention(msg):
|
||||
pass
|
||||
@@ -0,0 +1,19 @@
|
||||
def pluginStart():
|
||||
print(f"Starting '{__name__}'")
|
||||
|
||||
|
||||
def genericHooks():
|
||||
print(f"Starting '{__name__}'")
|
||||
funcList = ["memes1"]
|
||||
print(f"Registering hooks {funcList}")
|
||||
return [__name__,funcList]
|
||||
|
||||
def messageHooks():
|
||||
funcList = ["onMessage"]
|
||||
return [__name__,funcList]
|
||||
|
||||
def memes1():
|
||||
return "memes"
|
||||
|
||||
def onMessage(msg):
|
||||
print(f"Hey {msg['name']}, called from {__name__}")
|
||||
@@ -0,0 +1,23 @@
|
||||
import sys
|
||||
|
||||
def pluginStart():
|
||||
print(f"Starting '{__name__}'")
|
||||
|
||||
def genericHooks():
|
||||
print(f"Starting '{__name__}'")
|
||||
funcList = ["test11"]
|
||||
print(f"Registering hooks {funcList}")
|
||||
return [__name__,funcList]
|
||||
|
||||
def messageHooks():
|
||||
funcList = ["onMessage"]
|
||||
print(f"Registering hooks {funcList}")
|
||||
return [__name__,funcList]
|
||||
|
||||
def test11():
|
||||
print("test11")
|
||||
|
||||
def onMessage(msg):
|
||||
if msg['name'] == "test":
|
||||
print("Return test!")
|
||||
return "Test was here"
|
||||
Whitespace-only changes.
@@ -0,0 +1,31 @@
|
||||
import re
|
||||
|
||||
def pluginStart():
|
||||
print(f"Starting '{__name__}'")
|
||||
|
||||
def genericHooks():
|
||||
print(f"Starting '{__name__}'")
|
||||
funcList = []
|
||||
print(f"Registering hooks {funcList}")
|
||||
return [__name__,funcList]
|
||||
|
||||
def messageHooks():
|
||||
funcList = ["onMessage"]
|
||||
print(f"Registering hooks {funcList}")
|
||||
return [__name__,funcList]
|
||||
|
||||
def mentionHooks():
|
||||
funcList = ["onMention"]
|
||||
return [__name__,funcList]
|
||||
|
||||
def exampleFunc():
|
||||
# Do code
|
||||
pass
|
||||
|
||||
def onMessage(msg):
|
||||
print(f"From: {msg['name']}\nMessage: {msg['message']}")
|
||||
|
||||
def onMention(msg):
|
||||
mention = re.search(r"@.+? ", msg["message"]).group(0)
|
||||
mention = mention.strip()
|
||||
print(f"{mention.split('@')[1]} got mentioned")
|
||||
Reference in new issue
Block a user