Last active
January 16, 2026 20:22
-
-
Save EricPanDev/25d26c13f09a96cb0ec47d4d716eb5b0 to your computer and use it in GitHub Desktop.
Set a discord bot's token via discord's api - guild only.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| bot_token = "" | |
| guildid = "" | |
| data = {"pronouns": "pronoun goes here"} | |
| import requests | |
| headers = {"authorization": "Bot " + bot_token, "content-type": "application/json",} | |
| if requests.patch("https://canary.discord.com/api/v9/guilds/" + str(guildid) + "/members/@me", headers=headers, json=data).status_code == 200: print("Bot's Guild Pronouns Changed!") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment