Add source command

This commit is contained in:
Robert Miles 2018-08-05 11:25:46 -04:00
parent 587329a9ae
commit 6b7ce45843
1 changed files with 5 additions and 2 deletions

7
bot.py
View File

@ -4,8 +4,8 @@ def log(s):
with open("/home/khuxkm/tetrisbot.log","a") as f:
f.write(str(s)+"\n")
USAGE = dict(help="!help [command]",admin="!admin <task> [arg]")
HELP = dict(help="Helps define commands.",admin="Does admin tasks.")
USAGE = dict(help="!help [command]",admin="!admin <task> [arg]",source="!source")
HELP = dict(help="Helps define commands.",admin="Does admin tasks.",source="Links the source of the bot.")
PREFIX = "!"
BOTOPS = "khuxkm khuxkm|lounge".split()
@ -46,6 +46,9 @@ class TetrisBot(teambot.Handler):
PREFIX = prefix
self.say(self.channel,"{}: Prefix set to \"{}\".".format(nick,prefix))
def do_source(self,nick):
self.say(self.channel,"{}: https://git.tilde.team/khuxkm/tetrisbot".format(nick))
if __name__=="__main__":
channels = "#tetris".split()
bot = teambot.TeamBot(channels,"tetrisbot","localhost",chandler=TetrisBot)