master
BuildTools 3 years ago
parent 02cdf8cfda
commit aa38c0a4f8
  1. 2
      client.py

@ -68,7 +68,7 @@ class client():
headers = {"Authorization": "Bot {0}".format(self.config["token"]), "User-Agent": "mbdf (cynic.moe, v1)", "Content-Type": "application/json"}
return requests.get(endpoint, headers = headers).text
def execute_webhook(self, link, message, name = "webhook"):
requests.post(link, headers = headers, data = json.dumps({"content": message, "username": name}))
requests.post(link, data = json.dumps({"content": message, "username": name}))
def send_msg(self, id, message):
endpoint = f"https://discordapp.com/api/channels/{id}/messages"
# fstring wasn't working for the auth

Loading…
Cancel
Save