I'm making a discord.js bot and I want to read user integrations from the user id. But I can't find it from the docs and I don't know how to do it. Since I can see the integrations when I log in, I think that it would be available with discod.js, too. How can I do it?
You just can't fetch user connections without using Oauth2, unfortunately.
Related
Discord.js 13.7.0 | Node.js 16.5.5
Hi all, could I somehow get information on how many servers/guilds someone has?
I want this information to be added to the command userinfo
Example from dyno dashboard https://i.stack.imgur.com/8kkJP.png
You are only able to get the amount of servers your bot client is in.
To get the amount another user is in you need to use Discord's OAuth2 with the guilds permission. Documentation here. This is not possible with Discord.js in any of the documentation. You can check the User docs if you would like.
If you are creating a dashboard like the image provided, just have your guests log in and require guilds in the permissions scope. Try going here: https://discord.com/developers/applications/<your application ID>/oauth2/url-generator and then check the documentation for the methods to display on your website.
So i would like to make a bot that can access recent action from my supergroup. The flow is pretty simple, i want the bot to scrape all of the information inside of it and save it into database. I made it with python and telegram bot API
The bot is already admin and he can do anything that admin could do.
Is it possible to do that???
No. Bots can only do what's listed in the official API docs at https://core.telegram.org/bots/api. Instead, you can just keep track of what's happening in the chat.
I'm creating a bot with Dialogflow. It's quite straigtforward, and it worked on Telegram in no time. But things complicated when trying to integrate Dialogflow with Slack.
My bot is able to read direct messages from Slack, and I'm sure of it because the messages from Slack appear in the History section of Dialogflow. Good news there. In the same screen, I can see that Dialogflow answered all the messages Slack sent to it. But sadly, those answers don't appear in Slack.
By the way, just to confuse me more, the Dialogflow's test bot works flawlessly with Slack, publishing there with no issue. So, it's not anything related with the common values you have to copy from Slack and paste to Dialogflow to enable the integration.
It seems that my bot on Slack misses some kind of permission of the OAuth & Permissions screen, but I've tried some of theme, and I can't find the good one. Right now I'm using bot, chat:write:bot, im:write, and channels:read. I guess that only the two first ones are needed, but I'm totally lost and tried adding permissions with no reason. And then, I wrote this post.
Is there someone who has a simple bot that sends messages in direct messages on Slack? What are the needed permissions?
I had the same issue, it's quite easy to solve: just go on Manage Distribution in your bot's Slack API panel and click on the "Add to Slack" button.
That's all!
Under OAuth & Permissions, add "chat:write" to OAuth Scope. That will allow your bot to send messages to other users.
Is there a way to get the Dialogflow agent's conversation history programmatically?
I made a chatbot using Dialogflow. Now I need to get the conversation history of my agent programmatically.
That feature (an important one) is not available yet.
Since there is not an API call to retrieve a history of conversation So, the only way I know how is to
Go to the Training tab and see the conversations that way, although it only gives the reply in the form of the intent, and not what the bot actually replied.
But if you want to access all conversations history then don't go for one-click integration make your own login system with Outh2 and integrate using Detect Intent Api and store your conversations by logs.
Then you can get conversation history programmatically.
You need to log all the requests by writing your own code if you want
to get the history.
Depends on what history u meant to fetch.
You can easily integrate your agent with google chatbase and you can get the conversation history pretty simple.
You don't need to write any programs and all.
Chatbase Automatically keeps track of history and user messages.
But it can only store history of past 30 days. :)
If you are using the NodeJS library, aling with Dialogflow, one option for you would be to save your conversation inside the user object. That way the data /conversation can be accessed by the user in future sessions.
Here's how I'll go about implementing this:
function saveConv(conv){
Conv.user.storage.convToSave = 'conversation_object'.
}
To access it I'll do:
function getSavedConv(conv){
var savedConv = conv.user.storage.convToSave.
}
Please let me know if this amswered your question.
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