generate functionMon, 14 Nov 2022

Send hookah.txt to a discord webhook.

import requests def send_hookah(webhook_url, file_path): """ Sends a file to a discord webhook. """ with open(file_path, 'r') as f: content = f.read() r = requests.post(webhook_url, json={"content":content}) send_hookah('https://discordapp.com/api/webhooks/...', 'hookah.txt')

Questions about programming?Chat with your personal AI assistant