You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have added a bot as an admin to a public channel.
I have tried this:
@bot.command("channelstatus")defchannelstatus_command(chat, message, args):
"""shows the channel status of a user - joined or not"""status=chat.status_of(message.sender.username)
chat.send("*%s*"%status)
It is showing this error:
File "app/bot.py", line 491, in channelstatus_command status = chat.status_of(message.sender.username) File "/app/.heroku/python/lib/python3.6/site-packages/botogram/objects/chats.py", line 213, in status_of raise TypeError("Not available in private chats or channels")TypeError: Not available in private chats or channels
Activity
MarcoBuster commentedon Sep 15, 2019
Hi, thanks for your issue!
This is a bug of botogram, we're working for a solution. For now you can use the raw
getChatMembermethod:[-]check if a user is member of channel[/-][+]Check if a user is member of channel[/+]abhi3700 commentedon Sep 15, 2019
Thanks for the quick reply....It worked!!
But, how to check for a particular channel, if a user is a member?
Is it like this:
MarcoBuster commentedon Sep 15, 2019
Do this:
abhi3700 commentedon Sep 15, 2019
Thanks! it started working...
MarcoBuster commentedon Sep 17, 2019
@abhi3700 don't close this, this is a bug that needs to be resolved.
What I sent you is just a temporary solution.
abhi3700 commentedon Sep 17, 2019
Okay!