POST https://discord.com/api/webhooks/{webhook.id}/{webhook.token}
I can successfully send messages to the discord channel with this method.
Get Webhook Message
GET/webhooks/{webhook.id}/{webhook.token}/messages/{message.id}
I want to get back the message I sent with this method. But how can I get the messages id automatically?
I recently receive a 2 message in discord with invite link to server I received it from bot who doesn't share the same server with me or anything
How this is possible, I find some py codes but only work if the user and bot share same server
from discord.ext.commands import Bot, Greedy
from discord import User
bot = Bot(command_prefix='!')
#bot.command()
async def pm(ctx, users: Greedy[User], *, message):
for user in users:
await user.send(message)
bot.run("TOKEN")
How can I make one send messages to list of IDs not in same server?
Maybe the bot left the server after he sent the invite to everyone.
You could check if one of the bots was in the servers in the audit-log.
you could either get the user by id with the guild.get_member(id). That requires the user to be on that specific guild you try to get the user.
Or you can use bot.get_user(id) / await bot.fetch_user(id). There the bot tries to get the user. If found you can do sth with it else it will return None or raises the command Error UserNotFound.
A bot that has no mutal guild with a specific user cannot send a dm to them.
Also what purpuse is it to send dms to multiple users from a list?
Keep in mind that its against the Discord TOS to mass dm users without permissions. If they did not opt in sth to get dms I would not send random dms do multiple users.
I need a Discord.js bot to DM a user if an API gives it a username. Is it possible to DM a user via a bot?
From the docs: you can search Client.users via Collection.find() by comparing a user's User.tag:
let user = client.users.find(u => u.tag === "someUser#1234");
Then you can send them a DM via User.send():
user.send("A message from a bot");
Note that the bot and said user must at least share a server for the bot to be able to access this user.
I would like to know if it's possible to forward a message received to a one webhook to another webhook
Does Discord messaging API supports this?
I'm working with Facebook Messenger Bots and I need a way to make an HTTP Request for the last message sent by the user. All I can find is that Messenger Bots send a web hook with the information but, I specifically need to be able to manually check for the last message sent by the user. Any input would be helpful. Thank you.