Send private message in a public channel discord.js - javascript

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

Related

Reply in ephemeral message to a user's message

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.

How do I upload a custom emoji to my discord bot

I have made a discord bot and I would now like to get started on adding custom emojis. I have seen many tutorials on how to use client.cache or something to type an emoji, but how do I upload them and get their ID to use in my discord bot. I would appreciate a fast and easy answer!
<3
What you have to do is have your bot in a server with whichever emotes you want to use in your bot. Then, you type the emote with a backslash in front and send it, returning something like <:honk:670458084136845352>. That's what you put in the message for your bot.
If you have any issues, or this isn't clear enough, please let me know.

Is there a way to receive telegram messages in node.js without bot?

I would like to have a very simple client in nodejs (an example) that can receive messages from specific channels and groups in telegram. I just searched in internet but I only get bot samples. I want to receive group messages in what I don't have access to give privileges to my bot so I would like to know if I can receive my own messages with no bot as intermediary.
Refer to the Getting Started section to learn more about your first steps.
In short:
Create your client application
Get your app_id
Establish user authorization
Learn more about channels
Use channel methods to work with channel messages

How to Use Discord-Commando to Reply to Other Bots

In an effort to provide regression testing for my pre-existing bot on Discord, I'm trying to create another bot that sends timed messages in order to test the original bot.
For example, I would type "!test" into Discord, and the Testing Bot would send "?start" into the chat. This should trigger the Original Bot and have it reply to the Testing Bot.
Unfortunately, my Original Bot was created using Discord-Commando. Although normal Discord.js allows for replies to bots (and even itself as far as I've discovered), Discord-Commando.js does not. At least, as far as my initial findings go.
I've scoured Google and Discord-Commando's documentation for examples of interactions between bots using Commando, but I couldn't find anything.
At most, I found that there is indeed a boolean flag in a bot's User object that identifies it as a bot (i.e. it has a boolean saying "bot: true") but that's about it. When trying to use methods in the Command object, none of them seem to trigger when the bot is given a command from another bot.
My ultimate question is that - is there a method that I could override that would allow my bots to essentially "talk" to each other while still using Discord-Commando? And if not, are there any recommendations on how to automate testing a Discord bot?

Send new message for all bot users

I'm trying to understand telegram api (with node js) and now got this question. Is it really to create "form" and send custom message for all who using this bot? I.e. without restarting bot send message :)
The only way is:
You need to store all the users IDs somewhere. And after that you can sendMessage to all that IDs one by one.

Categories

Resources