python Code that send messages received in specific channels of discord channel as text message to phone - discord

I have subscribed to the channel in discord. sometimes I am missing messages in that discord, is there a code that sends that messages from a specific channels in discord to the phone via sms?

There is.
https://github.com/leogomezz4t/PyTextNow_API
PyTextNow enables you to send SMS from Python. To do this you would do something like:
import discord
import pytextnow
client = discord.Client()
text = pytextnow.Client("username", sid_cookie="sid", srf_cookie="csrf")
#client.event
async def on_message(message):
text.send_sms('number',message.content)
Be sure to read the pytextnow and Discord documentation.

Related

Finding message IDs in Discord channel

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?

discord - send message to bot from client

I am using discord.js
The scenario is something like this:
User posts something in one of the channel.
Bot replies to this user in a DM with
msg.author.send("I am the bot, and sending you this message as DM")
now, I want user to reply back to this bot in the DM again and i want bot and this user to communicate in the DM.
It seems like I can't achieve the user to send back the message to bot in the same DM.
I am using discord.js
Any idea ?
to dm a person, you must use message.author.send("Your message here.")
but you must have client code.

I'm wondering how this is possible? Discord bot

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.

Send Discord bot message when API function called

I'd like to send a message from a Discord bot whenever an API endpoint gets triggered.
It seems the only way to send messages is in response to discord events, for example using
#client.event
async def on_message(message):
I'd appreciate any pointers on how to send a discord bot message that's not triggered by an async Discord event (using discord.py preferably)
Thanks!

Discord API forwarding a message from one webhook to another webhook

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?

Resources