error if unknown command
This commit is contained in:
parent
482719780c
commit
43de1811e2
6
bot.py
6
bot.py
@ -88,8 +88,11 @@ class TestBot(irc.bot.SingleServerIRCBot):
|
||||
end = 'Available commands are: help, uptime, ram, cpu, uname, network, temp'
|
||||
c.notice(nick, end)
|
||||
|
||||
|
||||
else:
|
||||
end = 'Unknow command. Sorry'
|
||||
c.notice(nick, end)
|
||||
def main():
|
||||
# print(argv)
|
||||
if len(argv) != 4:
|
||||
print('Usage: {} channel nickname server'.format(argv[0]))
|
||||
exit(1)
|
||||
@ -99,6 +102,5 @@ def main():
|
||||
bot = TestBot(channel, nickname, server)
|
||||
bot.start()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user