error if unknown command

This commit is contained in:
GandC Snow 2021-10-21 21:52:36 +03:00
parent 482719780c
commit 43de1811e2

6
bot.py
View File

@ -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()