'how to use discord.py to put a custom prescense on a users account?
I want to make a program that shows the current song playing on a users (mine) apple music app on MacOS and display the info in the users' discord presence (not on a bot account), similar to the Spotify integration. However, all of the docs I'm reading for how to use discord.py, it only talks about using it with a bot, and I cannot find how to just use it for the user. I may not be looking in the right place but I'm not sure. Is there a way to just use it with a user, or do you need a bot to use discord.py?
I'm kinda dumb so sorry in advance and please help.
Solution 1:[1]
You will need to use a self-bot for this purpose and since it's against Discord's TOS I wouldn't recommend it.
import discord
client = discord.Client()
client.change_presence(
activity = discord.Activity(
type = discord.ActivityType.listening,
song = "I am so screwed!"
)
)
client.run("YOUR TOKEN")
Solution 2:[2]
Do it how you would normally with a bot, but replace the bot's token with your own. Make sure you're using discord.py and not a fork, as not all forks support selfbots.
client.run("Your Token, not a bots")
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | leftomash |
| Solution 2 | Trent112232 |
