Closed TPEcool closed 1 year ago
My program also redirects all errors and logs to a text file, but it is completely empty.
Are you sure you copied the example correctly? Your code segment has a typo (tilestamps
-> timestamps
).
Oh, thanks. Guess i somehow didn't notice it.
This was also partially my fault- the package should have raised an exception if Discord rejected anything. I've uploaded v1.1.0 to improve the error handling and prevent this issue. Thank you for bringing this to my attention!
I updated the package to 1.1.0, the presence does not show an image and the program neither crashes nor prints a warning message.
rpc.set(
{
'state':'In Game',
'details':'File: '+('none' if filename is None else '\''+os.path.basename(filename)+'\''),
'timestamps':{'start':startTime.get()},
'assets':{
'large-image':'beemmx_r',
'large_text': 'beeMMX R is a tool which generates music packages for BEE2. Learn more by clicking the GitHub button.'
},
'buttons':[
{
'url':'https://github.com/TPEcool/beeMMX-R',
'label': 'beeMMX R on GitHub'
},
{
'url':'https://discord.gg/gb7cp6asJF',
'label':'Discord server'
}
]
}
Additionally, the presence disappears after 10 seconds. The program keeps running, due to tk.mainloop()
, but 10 seconds after it's gone.
About the image: nevermind. I screwed up an underscore.
Unfortunately, it looks like Discord does not reply with an error if you mistype the asset key, so I can't really do much about that. Please double-check the examples and Discord docs before opening another issue. Thanks :)
Regarding the presence disappearing after 10 seconds, you might want to check that your code is continuously running inside the "with" statement (with Presence(id) as rpc:
). The rich presence works fine on my end, so maybe you can double check your loop to see if it is running as expected. Hope this helps.
I did everything like in the examples, however the rich presence simply does not work. What am I doing wrong?
It does neither errors, nor shows up in the Discord app. A while ago I had rich presence problems with a VS Code extension because I was using Discord in the browser, and switching to the app helped. However, I still am using the app, tried restarting it and my rich presence still doesn't work. I also tried adding the
while True: time.sleep(15)
part, but nothing changed.