Skip to content

Instantly share code, notes, and snippets.

@AkshuAgarwal
AkshuAgarwal / webhook.py
Last active July 9, 2023 17:31
Send Message using Discord Webhooks by making request or using discord.py
View webhook.py
"""Making a post request to Webhook, without using discord.py"""
import aiohttp
webhook_url = "your_webhook's_url" # URL of the Webhook (make sure NOT TO SHARE IT WITH ANYONE.)
# JSON data to send to the Webhook.
# You can find the data payload at https://discord.com/developers/docs/resources/webhook#execute-webhook
data = {
'content': 'Hello, world!',