Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ushie/discord-user-popout-svelte

A Discord user pop-out component for SvelteKit
https://github.com/ushie/discord-user-popout-svelte

discord discord-component discord-svelte discord-svelte-component discord-user discord-user-popout svelte svelte-component sveltekit

Last synced: 26 days ago
JSON representation

A Discord user pop-out component for SvelteKit

Awesome Lists containing this project

README

        

# Discord User Popout Svelte

[![npm](https://img.shields.io/npm/v/discord-user-popout-svelte)](https://www.npmjs.com/package/discord-user-popout-svelte)
![npm](https://img.shields.io/npm/l/discord-user-popout-svelte)

A Discord user pop-out component for SvelteKit

## Installation

```sh
pnpm add discord-user-popout-svelte
```

## Usage

```svelte

import { getUser, Profile } from "discord-user-popout-svelte";
import { onMount } from "svelte";
let user = null;

onMount(async () => {
user = await getUser(399862294143696897n);
});

{#if user}

{/if}
```

> [!Note]
> You need to be in the [Lanyard Discord server](https://discord.com/invite/WScAm7vNGF) for this to work

## Developing

1. Clone the repository

```sh
git clone https://github.com/Ushie/discord-user-popout-svelte.git && cd discord-user-popout-svelte
```

2. Install dependencies

```sh
pnpm install
```

3. Start development

```sh
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:

```sh
pnpm run package
```

## Credits

- Dustin @ https://dstn.to/ - [Discord User/CDN/Assets API](https://gist.github.com/dustinrouillard/04be36180ed80db144a4857408478854)
- Panley @ https://pa.nley.contact/ - Inspiration & Base CSS