tomer8007 / kik-bot-api-unofficial

Python API for writing unoffical Kik bots that act like humans
MIT License
128 stars 77 forks source link

Detect mentions #188

Closed Jumvah closed 3 years ago

Jumvah commented 3 years ago

Be able to detect mentions so something like:

@botname [command]

would send [command] to @botname (even if not in the current gc or pm) and response would be sent back to the gc / pm that made request

tomer8007 commented 3 years ago

Isn't this something that we should expect bot makers to implement in their bot? Or does it have something to do with kik itself?

bluemods commented 3 years ago

From re-reading it, no you cannot have an unofficial bot be called in any group. It has to be in the group / you have to PM it directly for it to work.

Sitiaro commented 3 years ago

I've been using this as a replacement and it's been working fine for me. (if you're using a private bot then ofc it won't be accessible by chats that don't have the bot, p sure that you need to get one from dev.kik.com to make that happen for the time being)

prefix='@'

    if chat_message.body.startswith(prefix):
        if chat_message.body.lower() == prefix+"yourbotname help":
            self.client.send_chat_message(chat_message.group_jid, 'help\n -whatever')
            return