discord-user-popout-svelte
v1.2.0
Published
A Discord user pop-out component for SvelteKit
Downloads
16
Maintainers
Readme
Discord User Popout Svelte
A Discord user pop-out component for SvelteKit
Installation
pnpm add discord-user-popout-svelte
Usage
<script>
import { getUser, Profile } from "discord-user-popout-svelte";
import { onMount } from "svelte";
let user = null;
onMount(async () => {
user = await getUser(399862294143696897n);
});
</script>
{#if user}
<Profile {user} />
{/if}
[!Note] You need to be in the Lanyard Discord server for this to work
Developing
Clone the repository
git clone https://github.com/Ushie/discord-user-popout-svelte.git && cd discord-user-popout-svelte
Install dependencies
pnpm install
Start development
pnpm run dev # or start the server and open the app in a new browser tab pnpm run dev -- --open
Everything inside
src/lib
is part of your library, everything insidesrc/routes
can be used as a showcase or preview app.
Building
To build your library:
pnpm run package
Credits
- Dustin @ https://dstn.to/ - Discord User/CDN/Assets API
- Panley @ https://pa.nley.contact/ - Inspiration & Base CSS