diff --git a/commands/wordcount.py b/commands/wordcount.py new file mode 100644 index 0000000..7a2246e --- /dev/null +++ b/commands/wordcount.py @@ -0,0 +1,8 @@ +import plugin, subprocess + +unhighlight_nick = lambda nick: "_{!s}_".format(nick) + +@plugin.command("wordcount","") +def wordcount(bot,channel,nick,user): + output = subprocess.check_output(["/usr/local/bin/wordcount",user]).decode("utf-8").strip() + bot.say(channel,nick+": "+unhighlight_nick(user)+" has written "+output+" words on cosmic.voyage")