Skip to content

Ushie/discord-user-popout-svelte

Repository files navigation

Discord User Popout Svelte

npm npm

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

  1. Clone the repository

    git clone https://github.com/Ushie/discord-user-popout-svelte.git && cd discord-user-popout-svelte
  2. Install dependencies

    pnpm install
  3. 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 inside src/routes can be used as a showcase or preview app.

Building

To build your library:

pnpm run package

Credits