Automatic change of Discord "About me"

Viewed 1054

THE PROBLEM:

In Discord, as you may know, there is a "About me" section.

This section is as description of a profile that you can write yourself.

Bots can have a "About me" section.

What I want, is to edit this "About me" section automatically in discord.py; For example, Every hours, the "about me" section of the bot change.

WHAT I TRIED:

I searched for a very long time some answers, but didn't find anything relevant.

I saw that you can modify the "about me" with the Developer portal, but it's not automate.

I saw that some people said "This will be able in discord.py V2" but didn't find it

It may be possible to resolve this probleme with HTTP requests but it's only a supposition, I'm not very good in this topic.

SHOW SOME CODE:

@bot.event
async def on_ready():
    while 1:
         await change_the_about_me_section(str(random.randint(0,1000))
         time.sleep(3600)
    # change_the_about_me_section isn't a real function
    # I just wanted to show an exemple of what I wanted to do


3 Answers

There is an answer.

You can fully automate it with Python in a few lines.

With the requests library.

You just have to first include requests with:

import requests

Then, do a patch request

requests.patch(url="https://discord.com/api/v9/users/@me", headers= {"authorization": token}, json = {"bio": abio} )
# With token your token, and abio a string like "hello"

And... that's it :)

(Note: You can also do that with the color of the Account with accent_color instead of bio, and the banner with banner instead of bio)

You can only do this as the application owner/a team member manually in the Developer Portal. Automating this would count as automating your user account (eg. self-boting) wich is against Discords Terms of Service and can get your account banned.

The bot itself has no access to this endpoint.

Related