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.
Related
So basically I have a support bot that creates a channel when someone reacts that only staff have access to. In order to prevent abuse I want to make it so that a new channel channel cannot be created by the same person unless the a previously open channel is deleted.
Give your bot access to the AuditLogs will allow you to see who is creating the channels but I suspect that's not gonna help because the bot will be the one creating and deleting the channels, for the discord server he is the owner of the action.
Maybe the only way is to store in the bot code a map of the channel id and his owner (user that typed the command). With this every time a user try to create a new channel you can check on your map if there is any channel active for that user and if there is show some kind of error message.
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>`);
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!
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.
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.