Using Python Requests to Send Discord Messages (Discord Token)

preview_player
Показать описание
Using this method, we can practically build our own api wrappers. Note that this is not allowed with user tokens, and is only for educational purposes.

Contact:
Discord: 0xd8d#4385
Рекомендации по теме
Комментарии
Автор

Discord has made a change to this endpoint, which will require you to now also include the content-type in the header, which has to be application/json. Furthermore, you need to change data=payload to json=payload instead.

codiumyt
Автор

A very straight forward tutorial addressing the issue to the point.
Thanks a lot.

nasimhc
Автор

Straight to the point, with a clear explanation that covers exactly what I was looking for. Thank you!

jam
Автор

If you want the code here :


import requests

payload = {
'content': "TEXT"
}

header = {
'authorization': 'Your authorization'
}

r = requests.post("The API Link",
data=payload, headers=header)

idontknow
Автор

Tysm keep uploading videos about requests!!

nothingold
Автор

Tyvm, when I tried it without a tutorial I almost gave up but your video saved me!
Keep up the good work!! 👍

Cube_Box
Автор

This is exacly what I needed, great tutorial, quick and meaningful!

isembart_
Автор

It works fine when I send a normal message, but when I send a command it doesn't recognize it and sends my command as a message. Does anyone know how to fix this?

Gemstew
Автор

Omg, never have i seen such a tremendous library

aldinbas
Автор

For anyone doing this with a bot and the v10 api, make sure you add "Bot" before your token in the authorization. It should look like: "Authorization": "Bot TOKEN". Not sure how you would do this with a client, but really you should be using a bot anyway.

mxruben
Автор

You are truly a gem i love ur channel and videos best tutorial

laughterdaily_alljokesinside
Автор

YOU ARE AMAZING BRO! I finnaly fixed my problem with you video, thank you for existing

alanr
Автор

Thank you so much!!! it worked! never thought i could be able to do something like this...

krishnaraj
Автор

Your discord account is not accessible and the invite to your discord server is expired. I have my code exactly how yours is, but with my own channel id and auth, but nothing happens when i run the code.

bigkawk
Автор

Thank you, I love how easy it is and you did a great job explaining it

PeterTranPrime
Автор

so i was the only fool who used selenium to open a browser, login, and then send msg.. :((

btw im happy to learn this, thanks m8

coronaklledmebot
Автор

Hello, whenever I run this from visual studio it works. But if I run it from somewhere else(Like from my Desktop), it will crash

luciddbd
Автор

its simple, easy to understand and it works.
thank you bro, you save my day🤗

DeepakKumar-siwl
Автор

hey m8, i am experiencing issues over here! it doesnt seem to post any messages nor give a full on description on what happened in the shell

barracudalake
Автор

could you please make a video on how can you incorporate slash (/) commands with this since the message is getting sent but the bot action is not being taken

ultrapluton