Closed hellomikko closed 1 year ago
Also not to mention it shows im Editing line 75/625
for like an hour and im using the LeonardSSH.vscord extension on vscode.
This works for me but replace it with your values
{#if $data && $data.discord_status === "online"}
<p>Online</p>
{:else if $data && $data.discord_status === "offline"}
<p>Offline</p>
{:else}
<p>Do not disturb</p>
{/if}
Thanks, Ill give it a try here in a min or two, just in for work. Thanks for you comment! ππΎ
Ive tried that and it still dont update the discord_status at all. I even change my status left and right on purpose to see each time and it dosnt work no matter what from https://api.lanyard.rest/v1/users/625796542456004639. But when I go to @eggsy's doc it works on the fly on https://lanyard.eggsy.xyz/. This crap is giving me gray hairs without tailwind too:
SEE THE BOTTOM REPLY TO THE SCRIPT THERE
{#if userPresence.discord_status === 'online'}
π’ Online
{:else if userPresence.discord_status === 'idle'}
π‘ Idle
{:else if userPresence.discord_status === 'dnd'}
π Do Not Disturb
{:else}
<span class="text-gray-500">⚫</span> Offline
{/if}
That is what I have and the only thing thats working is the spotify. But for some damn reason the discord_status
is not working and theres not 1 person in the svelte community or here even to help.
What does the discord_status label under anyways?
Also here is the full code I was using https://sourceb.in/R1nGgMPZzG
Use this one instead https://github.com/iGalaxyYT/svelte-lanyard
Did you do this?
{#if $userPresence && $userPresence.discord_status === "online"}
<p>Online</p>
{:else if $userPresence && $userPresence.discord_status === "offline"}
<p>Offline</p>
{:else}
<p>Do not disturb</p>
{/if}
Sorry I've been away guys and I do thank you for your cooperation and help. @Ogooooo , I used the code you gave me which didnt work but I reworked and and got something else that will work. You can see it here which is similar to what you and I both have: https://codesandbox.io/s/svelte-lanyard-demo-forked-qtflmc?file=/App.svelte.
I see that lanyard uses data but my blog posts uses data as well. its like a IP Conflict if you know what I mean. So I had to rename something, or both in order for it to work and not cause any conflicts. Thank you guys and I will use that. :) You can see the my page for the live version https://mikko.codes. Again, I do appreciate everyone's help even if you responded and I did not mentioned your name.
π
So im having an issue with the
"discord_status":"..."
not showing up correctly and I have as my snippet:and my
<script></script>
is:So when I manually change the status to test it, it works via lanyard api and shows the correct status but, it change on my webpage.
Is anyone else having this issue or is it just me?