Vue hook for lanyard for tracking your Discord presence through REST or websockets.
<script setup lang="ts">
import { useLanyard } from 'vue-lanyard';
const DISCORD_ID = 'XXXXXXXXXXXXXXXXXX';
const { data } = useLanyard(DISCORD_ID);
</script>
All types used for this library are also readily available & can be used as follows:
import type { Data, Activity, ... } from 'vue-lanyard';
Currently this project is built around using swrv
which relies on @vue/composition-api
. As such, Vue 2.x support is currently not functioning, but it is currently in the works.
- Phineas Walton – Author of lanyard
- Alistair Smith – Author of this
use-lanyard
which heavily inspired this library