Add source command
This commit is contained in:
parent
587329a9ae
commit
6b7ce45843
7
bot.py
7
bot.py
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue