demobot fixes
This commit is contained in:
parent
05020f126e
commit
4fe497164c
1 changed files with 2 additions and 3 deletions
|
|
@ -42,13 +42,13 @@ class DemoBot(SMALBot):
|
||||||
|
|
||||||
if msg["content"]["body"] == "!stop":
|
if msg["content"]["body"] == "!stop":
|
||||||
logger.info(f"stopping the bot")
|
logger.info(f"stopping the bot")
|
||||||
bot.stop()
|
self.stop()
|
||||||
return
|
return
|
||||||
|
|
||||||
if msg["content"]["body"].startswith("!echo"):
|
if msg["content"]["body"].startswith("!echo"):
|
||||||
logger.error(f"reply to this: {msg}")
|
logger.error(f"reply to this: {msg}")
|
||||||
|
|
||||||
bot.sendmessage(msg["roomid"], "huhu")
|
self.sendmessage(msg["roomid"], "huhu")
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
@ -57,7 +57,6 @@ class DemoBot(SMALBot):
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
# create and run the bot
|
# create and run the bot
|
||||||
global bot
|
|
||||||
bot = DemoBot(DEFAULT_PREFIX)
|
bot = DemoBot(DEFAULT_PREFIX)
|
||||||
bot.run()
|
bot.run()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue