BotName = "Betty"; function onMessage(msg) print(type(msg).."\n"); if (string.find(msg.body:upper(), BotName:upper())) then print("Contains my name!\n"); reply = {}; reply.body="Hello there!"; reply.to = msg.fromBare; reply.type = "groupchat"; return reply; end end