Git Product home page Git Product logo

Comments (9)

codemikko avatar codemikko commented on May 30, 2024 1

Thanks, Ill give it a try here in a min or two, just in for work. Thanks for you comment! 👍🏾

from lanyard.

codemikko avatar codemikko commented on May 30, 2024 1

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">&#9899;</span> Offline&nbsp;
{/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.

from lanyard.

codemikko avatar codemikko commented on May 30, 2024

Also not to mention it shows im Editing line 75/625 for like an hour and im using the LeonardSSH.vscord extension on vscode.

from lanyard.

hueodev avatar hueodev commented on May 30, 2024

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}

from lanyard.

codemikko avatar codemikko commented on May 30, 2024

What does the discord_status label under anyways?

Also here is the full code I was using https://sourceb.in/R1nGgMPZzG

from lanyard.

hueodev avatar hueodev commented on May 30, 2024

Use this one instead https://github.com/iGalaxyYT/svelte-lanyard

from lanyard.

hueodev avatar hueodev commented on May 30, 2024

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}

from lanyard.

codemikko avatar codemikko commented on May 30, 2024

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.

from lanyard.

hueodev avatar hueodev commented on May 30, 2024

👍

from lanyard.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.