Answers for "discord.py how to send message"

1

send message to discord wrbhook python

from discord_webhook import DiscordWebhook, DiscordEmbed

webhook = DiscordWebhook(url='your webhook url', username="New Webhook Username")

embed = DiscordEmbed(title='Embed Title', description='Your Embed Description', color='03b2f8')
embed.set_author(name='Author Name', url='https://github.com/lovvskillz', icon_url='https://avatars0.githubusercontent.com/u/14542790')
embed.set_footer(text='Embed Footer Text')
embed.set_timestamp()
embed.add_embed_field(name='Field 1', value='Lorem ipsum')
embed.add_embed_field(name='Field 2', value='dolor sit')
embed.add_embed_field(name='Field 3', value='amet consetetur')
embed.add_embed_field(name='Field 4', value='sadipscing elitr')

webhook.add_embed(embed)
response = webhook.execute()
Posted by: Guest on June-05-2021
0

discord.py send messages

#plain text
await message.channel.send("content")

#with a embed
await message.channel.send("content", embed=embed_name)

#with a file/image
await message.channel.send("content", file="file/image path")
Posted by: Guest on August-04-2021

Code answers related to "discord.py how to send message"

Python Answers by Framework

Browse Popular Code Answers by Language