Skip to content

How to subscribe to specific channels? #1

@mhyousefi

Description

@mhyousefi

Hi there

First of all, thanks for your cool repo.

In your example you do:

bot.connect()
bot.login(user=bot_username, password=bot_password)
bot.subscribe_to_messages()
bot.add_prefix_handler("", process_message)

The third line subscribes the bot to pretty much all channels. I would like to limit the bot to just a few. I realize that subscribe_to_messages() calls the subscribe, which has an input name (the name of the publication to subscribe). I tried setting it to my channel name, but I it didnt work, showing me this error log:

{"msg":"nosub","id":"2","error":{"isClientSafe":true,"error":404,"reason":"Subscription '<CHANNEL_NAME>' not found","message":"Subscription '<CHANNEL_NAME>' not found [404]","errorType":"Meteor.Error"}}

Any advice as to how I can subscribe to only a select number of channels?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions