Custom pings on announce command Discord.js - discord.js

Right now I have an announce command that pings everyone when I send an announcement, but I want to change the ping so that it pings a certain role in my server. The first code is the code that works and pings everyone, and the second two lines of code are the custom ping that is not sending as a ping but just a line of text. How can I make the second two lines of code send as a ping like the #everyone?
message.channel.send(`#everyone`)
message.channel.send(announceEmbed);
message.channel.send(`#Stream`)
message.channel.send(announceEmbed);

It is an exception that only everyone role would ping the everyone role of the guild when sent as #everyone. But it is not the case for other roles, as well as for member and channel. So
You can ping/mention the particular role using the ID of the role,
message.channel.send(`<#&roleid>`);

Related

Can't ping channel - discord.js

I'm able to tag a user like this <#524679333387741697>, but I haven't been able to ping a channel to alert users doing the same time with the channelId. When I try that with a channel it just outputs <#222223387741697>
I know how to link a channel like <#1059573997458698240>, but how can I ping the channel like #channel not #channel?
You can only mention Roles and users with #role. #channel hasn't, and will never be a feature. The most you can do is ping the role that has access to the channel. Otherwise, you can link a channel with #channel as you mentioned correctly.

Discord GitHub Webhook add role ping

I am using a Webhook to integrate Discord with GitHub for sending messages when a repository has been pushed to. However, I want the webhook to automatically ping a certain role (I have an #Updates role in the server) whenever this happens.
Is there are way to ping a role or even add text to a Discord GitHub Webhook? If not, is there a bot or other service that pings a certain role whenever a message is sent in a certain channel?
Any help is appreciated. Thanks in advance!

Run One instance of Discord bot per server, So bot doesn't turn on on every server

So my code activates a listener which will then just simply return the message to the user. However, once the listener is activated, it will be GLOBALLY activated, so all servers with this bot will be affected. How can i create one instance of the bot per server.
The only way to run multiple instances of a bot would be to copy the bot's code and use it in several other bots. You'd need to create several bot applications/users from the developers page and generate tokens for each bot.
It's a bit sketchy and not recommended so I'd be careful with what you're trying to achieve here.

Command Usage in DMs | Discord.js

I am making a bot that has a command where you can text people.
The point is you send a text through a server to a user, which the user will receive a DM with the contents. The user uses the command through the bot's DMs which will then send that message to the senders DMs.
Basically I need to know how to make it so the user can use the command through DMs and send a message back to the sender.
What you can do if you don't use database is save the senderID who dm-ed someone through the command in server. And then take the senderID from the json get user from it and then save as a variable.
You can use this function to send a dm
user.send("message here");
User is the user object and send is one of it's methods.

How to get list of all the servers to which discord owner is connected

Is there any API to get list of all the servers to which the discord owner(user) is connected.
I want to write a bot to manage all the servers connected to discord owner's account.
As Jeremy mentioned you can use  https://discordapp.com/developers/docs/resources/user#get-current-user-guilds if logged in as the user you're trying to get guilds of. A total list of Guilds isn't possible to get for other users though, you'll only get mutual/shared guilds displayed for others.

Resources