How to get the Group chat added member list from ChatBot in msteams - node.js

how to collect all the group chat members from the chat bot using MSTeams?

You can use the GetPagedMembers capability for this - see the docs from Microsoft here: https://learn.microsoft.com/en-us/microsoftteams/platform/bots/how-to/get-teams-context?tabs=dotnet (switch to your language of choice in the samples blocks).
Note that, using this approach, you can only do this when the user is actually interacting with the bot (e.g. posting a message) because you need the context. If that's a problem let me know and I will send additional info.

Here are the two ways that can work for you
Using graph - List members of a chat. Refer this sample.
Get conversation member. (you are already aware about this as I can see.)

Related

How to brodcast custom messages using python-telegram-bot

I am new to Python. I want to broadcast a custom message to the users who registered my bot in a group or in private / personal.
How to do that function? Please help me - thank you
basically, you'll have to keep track of all the user/chat_ids of the groups/chats you bot is a member in. Then for broadcasting, you'll have to iterate over all of them and send a message to each.
The bot API offers neither a functionality to send messages to a bunch of chat_ids at once nor to get all chat_ids where your bot is currently a member in.
In fact, we have some information about such use cases over at the wiki of python-telegram-bot.
However, the logic is mainly implementation independent, i.e. you'd have to apply the same logic if you were to implement your bot with another python library or even a completely different programming language :)
Disclaimer: I'm currently the maintainer of python-telegram-bot.

Google Hangouts Chatbot Create Room

I am writing service for messaging between rooms using Hangouts chatbot. Is it possible to create a room with Hangouts chatbot?
https://developers.google.com/hangouts/chat/concepts
If it were generally possible to create a new room programmaticaly with the Hangous API, you could do it with the chatbot.
For example, if you implement the chatbox with Apps Script, you can create a function onMessage(event) and establish was will to happen in case of a certain event.message.text (e.g. create a new chat room if the message text contains the string create new room.
However, for the moment it is not possible to create a new chat room programmatically.
There is a feature request asking for this functionality, but given the potential of abuse, it is controversial either it will be implemented.
See comment #2:
Hello, thank you for the feature request! At the moment rooms cannot
be created via the API to prevent abuse such as a bot or script
spamming room creation. However, this kind of feature has been
discussed internally and may be coming in the future (with
limitations). I will update this issue if more information is
released.
And comment #25:
Thanks for the input. It's great to see some real life use cases. We
fully acknowledge the importance of a CreateRoom(DM) API and we are
actively looking into the right permission model to allow bots to do
so. Please continue to follow this bug as we will post updates here
when appropriate.

Can I install multiple bots on a single Facebook fanpage

We are having two teams building two bots for our Facebook fanpage. One is for customer service and the other one is for a quiz campaign. Can we have the two bots on the same fanpage? Will there be any conflicts such as the custom menu?
The short answer is YES!
However unless managed correctly there will be conflict.
I know it is possible to use one chatbot built on ManyChat and another on Flowxo.
I need to ensure that I LIMIT the "keywords" in ManyChat so that ManyChat does not respond and allows FLOWXO to respond.
In my situation, I am using the Pro version of MC to get users subscribed and to further broadcast to them or subscribe them to a sequence. I pass over the conversation to Flowxo for integrations to third party software and for the basic conversational aspect of the chatbot.
Passing the conversation over from one chatbot to the other takes some manipulation of the use of keywords and Flowxo's "unrecognised phrase" flow.
I will post the link to a blog post when I get around to writing about how I did it.
Another issue as you pointed out is the Greeting and Welcome text. I have not figured out a way to control this and as it turns out with my chatbot, users always appear to enter into the chatbot via ManyChat which fortunately for me is exactly what I need.

Don't let member to send message in telegram group

I'm looking for a way in telegram group that don't let member to send message or, delete message after a person send.
Is it possible to create a bot like this how help admins to stop chatting after start the bot?
Is there any other way to do this?
Now you can do this.
Restriction from chatting in group:
Now you can achieve this with restrictChatMember() Bot API method.
Deletion of users' messages:
For deletion use this method: deleteMessage()
DON'T forget to grant admin rights to your bot.
11/07/18: This answer is no longer up to date please look at woozly's answer
Short answer: No (at least not with the bot api)
Longer answer:
There currently is no way of stopping someone from chatting without outright kicking them out of the group. Additionally, bots currently lack the ability to delete messages so that's also not doable with the bot API.
Edit: Actually it's probably possible using the Telegram API instead of the Telegram Bot API where you would just create a regular user which is controlled programmatically to delete messages of "muted" people. I assume that this is likely not as simple as doing stuff with the bot API but in theory, it's possible.
#telemethebot has exact the feature you request:
Silent Mode
When group silent mode switched on, only group administrators can speak in that group. This help you turning your Telegram supergroup to a channel temporarily.
Teleme - Features

Telegram Bot Event When Users Join To Channel

After create telegram bot, access and admin this bot to channel. how to get channel members list or event when users join to this channel?
Pretty disappointed with the current answers, so I'll leave an updated (as of February 2018) answer that explains how to do this with the Telegram API itself, as well as with the framework I am using, Telegraf for Node.
The Telegram API is both very powerful, and pretty simple as far as API's go. If you are using the polling method of getting updates, and not websockets which are a whole other issue, checking if someone new has been added to a group or channel is very easy.
The API method getUpdates returns an array of Update objects, which contain all of the possible information you could want including any messages sent, inline queries, and new chat members. To get any new chat members you simply need to access update.message.new_chat_members which will contain an array of new users. For reference you can look in the API documentation here.
To fetch the update objects in browser, or with curl, all you have to do is send a GET or POST request to https://api.telegram.org/botYOUR-BOT-TOKEN/getUpdates. Then just look for messages->new_chat_members.
If you are using the Telegraf bot framework with NodeJs you can use the bot.on method with the event new_chat_members.
Example:
bot.on('new_chat_members', (ctx) => console.log(ctx.message.new_chat_members))
I know this was asked a while ago, but I hope this helps other people searching.
From docs:
new_chat_members New members that were added to the group or supergroup and information about them (the bot itself may be one of these members)
So i think you can't.
To get updates on users join group or channel you must correctly setup webhook for your bot. This update type is disabled by default. See https://core.telegram.org/bots/api#setwebhook
allowed_updates
A JSON-serialized list of the update types you want your bot to
receive. For example, specify [“message”, “edited_channel_post”,
“callback_query”] to only receive updates of these types. See Update
for a complete list of available update types. Specify an empty list
to receive all update types except chat_member (default). If not
specified, the previous setting will be used.
Please note that this parameter doesn't affect updates created before the call to the getUpdates, so unwanted updates may be received
for a short period of time.
So, the request should look like this:
https://api.telegram.org/<BOT_TOKEN>/setWebhook?url=<WEBHOOK_URL>&allowed_updates=["chat_member"]
Yes! You can use this:
https://api.telegram.org/bot[TOKEN]/promoteChatMember?chat_id=#[channelname]&user_id=[user_id]
if user is joined response is ok, else response is not ok.

Resources