Reply in ephemeral message to a user's message - javascript

is it possible for a bot to reply to a user's message and the reply would be in ephemeral? like, if user1 sends a message the bot will automatically respond in ephemeral. only asking if this is possible if the user didn't do any sort of interaction with the bot

Bots can only send ephemeral responses when replying to an interaction (slash command, button interaction, select menu, etc.) - it is not possible to send an ephemeral message when replying to a message without an interaction.
The discord.js documentation can provides useful information regarding this: discord.js.org | CommandInteraction/ephemeral
You can also read more in the discord.js guide here (note how it is specifically under the slash commands section): discord.js guide | Slash Commands/Ephemeral Responses
Hope this helps clear things up.

Related

Send a message with discord account using javascript (human account)

There are lots of information with discord.js but I want to know how to use http requests with javascript and post messages on discord.
Is there anyway to do this?

Send private message in a public channel discord.js

How do you create this
in discord.js version 12.5.3. I mean that Only you can see this. I know how to send message to a channel using message.channel.send but how do I send the Only you can see this message. Thank you
There is no way of sending these types of "hidden" messages on Discord.js v12, it is feature introduced on v13 on Interactions. Which are related to slash commands and buttons.
Pretty sure you can not send them as it from message (or messageCreate) event.
You can read more about Ephemeral responses and maybe work on your implemention of slash commands to your bot

How can i send input data from form fields on my website to a discord webhook which pms a user on discord?

ideal look
Webook would dm user specific info inputted into the form on my website:
name, age, location.
Discord Web hooks can be used to send messages to servers but it can not be used for direct messaging users. You can read more about discord web hooks here
Webhooks can't send messages in direct messages or groups. But they can send in a discord server.
However, if you want to send a message to a user in their DMs, you can create a simple bot for that.

Dialogflow Send message without user intent

Looking to find a way to make dialogflow send a message to the user every x minutes,
without any intent or user action required.
is there a way to do this? maybe making a custom event?
If someoneone could explain if this is possible that be great.
im also using nodejs for my bot.
No, this isn't possible. Dialogflow is designed for conversational exchanges.
Dialogflow is a NLP engine, It's designed to respond to the user input(either a text input, or an event request).
One way to do resolve this issue is, from the Client side run a thread that will send event request asynchronously after every x minutes, and the bot will reply with a message.
Visit https://dialogflow.com/docs/events/custom-events for more information.
Please reply if you need any more information/example on this.
As #Prisoner said it isn't possible to do with dialogflow itself but you can look into assistant push notifications where you can get permission from user to send notifications and if user allow then you can send notification periodically. You can find more in docs.

Is it possible to "pause" a message from being sent to check it?

What I mean by this is, I want to make a moderation bot, but something that'd be cool is to pause a messaging being sent while the bot checks it, and then approve it to be sent. The reason I'd like to do this is so any inappropriate content cannot be seen at all, but if I didn't do this then people could see the bad content for a second or two before the bot edits or deletes it.
If you mean the bot interrupts the message before it's sent to other users that is impossible. Bots are unable to intercept the message before it reaches other users as the bot is considered a user when it comes to messaging receiving. It receives the message the same time the user does.

Categories

Resources