1.0.4 โ€ข Published 3 years ago

@leonardssh/use-lanyard v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Remember to ๐ŸŒŸ this Github if you ๐Ÿ’– it.

๐Ÿ“ฆ Installation

  • Using yarn: yarn add @leonardssh/use-lanyard
  • Using npm: npm i @leonardssh/use-lanyard
  • Using pnpm: pnpm add @leonardssh/use-lanyard

๐Ÿค“ Usage

โœจ This plugin supports both REST and WebSocket methods.

Using without websocket:

import { useLanyard } from '@leonardssh/use-lanyard';

const { success, data, error } = await useLanyard({
	userId: 'USER_ID'
});

Using with websocket:

import { useLanyard, LanyardData } from '@leonardssh/use-lanyard';

await useLanyard({
	userId: 'USER_ID',
	socket: true,
	onPresenceUpdate(presence: LanyardData) {
		...
	}
});

๐ŸŽ‰ Thanks

๐Ÿ‘จโ€๐Ÿ’ป Contributing

To contribute to this repository, feel free to create a new fork of the repository and submit a pull request.

  1. Fork / Clone and select the main branch.
  2. Create a new branch in your fork.
  3. Make your changes.
  4. Commit your changes, and push them.
  5. Submit a Pull Request here!

๐Ÿ“‹ License

This project is licensed under the MIT License - see the LICENSE file for details.