
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
sk-lanyard
Advanced tools
SvelteKit integration with Lanyard, an API to fetch your Discord presence
sk-lanyard
(SvelteKit + Lanyard)SvelteKit integration with Lanyard, an API to fetch your Discord presence.
sk-lanyard
is fully typed and supports the entire Lanyard API, using both REST and WebSockets.
The useLanyard
function returns a reactive store containing presence data.
<script>
import { useLanyard } from 'sk-lanyard';
const presence = useLanyard({ method: 'rest', id: '524722785302609941' });
</script>
<pre>
<!-- Because presence is a reactive store, use $presence to access the data -->
<code>{JSON.stringify($presence ?? {}, null, 2)}</code>
</pre>
import { useLanyard } from 'sk-lanyard';
// Optionally import Lanyard types
import type { LanyardData, LanyardHello } from 'sk-lanyard';
// Use the REST API to fetch a single user
const lanyard = useLanyard({ method: 'rest', id: '524722785302609941' });
// Use an interval of 1000 ms
const lanyard = useLanyard({
method: 'rest',
pollInterval: 1000,
id: '524722785302609941'
});
// Use a custom endpoint
const lanyard = useLanyard({
method: 'rest',
restUrl: 'https://lanyard.example.com/rest',
id: '524722785302609941'
});
// Use the WebSockets API to subscribe to a single user
const lanyard = useLanyard({ method: 'ws', id: '524722785302609941' });
// Subscribe to multiple users
const lanyard = useLanyard({
method: 'ws',
ids: ['524722785302609941', '299707523370319883']
});
// Subscribe to all users tracked by Lanyard
const lanyard = useLanyard({ method: 'ws', all: true });
// Use a custom endpoint
const lanyard = useLanyard({
method: 'ws',
wsUrl: 'wss://lanyard.example.com/ws',
id: '524722785302609941'
});
FAQs
SvelteKit integration with Lanyard, an API to fetch your Discord presence
We found that sk-lanyard demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.