15 lines
414 B
Python
15 lines
414 B
Python
|
import words, plugin, random
|
||
|
from titlecase import titlecase
|
||
|
words.loadDict("words")
|
||
|
|
||
|
@plugin.command("backronym","<word>")
|
||
|
def backronym(bot,channel,nick,word):
|
||
|
result = []
|
||
|
for char in word:
|
||
|
result.append(random.choice(words.getWords("^{}.*".format(char))))
|
||
|
bot.say(channel,nick+": "+titlecase(" ".join(result)))
|
||
|
|
||
|
@plugin.command("kwam","")
|
||
|
def kwam(bot,channel,nick,*a):
|
||
|
backronym(bot,channel,nick,"kwam")
|