mirror of
https://github.com/RussellChamp/tilde-projects.git
synced 2026-10-28 00:22:34 +00:00
Ported banterbot to pinhook framework and some other changes
This commit is contained in:
1 parent
0627b4a9e3
commit
bc102890b2
39 files changed
+1629
-507
No files matched your search
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
import pinhook.plugin
|
||||
import random
|
||||
|
||||
@pinhook.plugin.register('!rainbow')
|
||||
def rainbow_plugin(msg):
|
||||
word = msg.arg or "RAINBOW"
|
||||
output = ""
|
||||
rb = ["5", "7", "8", "3", "12", "13", "6"]
|
||||
bg = "01"
|
||||
idx = random.randrange(0, len(rb))
|
||||
|
||||
for l in word:
|
||||
if l == " ":
|
||||
output += " "
|
||||
else:
|
||||
output += "\x03" + rb[idx % len(rb)] + "," + bg + l
|
||||
idx += 1
|
||||
|
||||
return pinhook.plugin.message(output)
|
||||
Reference in new issue
Block a user