mirror of
https://github.com/jaronpate/unicord.git
synced 2026-10-18 21:47:40 +00:00
readme updates
This commit is contained in:
@@ -5,9 +5,16 @@
|
|||||||
|
|
||||||
> This package is in an early Alpha stage and not yet ready for consumption
|
> This package is in an early Alpha stage and not yet ready for consumption
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
```
|
||||||
|
yarn add @jaronp/discord.ts
|
||||||
|
```
|
||||||
|
|
||||||
## Quick Start
|
## Quick Start
|
||||||
A small example implementation.
|
A small example implementation.
|
||||||
```ts
|
```ts
|
||||||
|
import { Client } from '@jaronp/discord.ts';
|
||||||
|
|
||||||
// Initialize and configure
|
// Initialize and configure
|
||||||
const bot = new Client({
|
const bot = new Client({
|
||||||
token: '<token>',
|
token: '<token>',
|
||||||
@@ -28,7 +35,7 @@ bot.handlers.register('READY', (client, context, data) => {
|
|||||||
// Register a command
|
// Register a command
|
||||||
bot.commands.register('ping', (client, context, args) => {
|
bot.commands.register('ping', (client, context, args) => {
|
||||||
context.reply('Pong!', true);
|
context.reply('Pong!', true);
|
||||||
})
|
});
|
||||||
|
|
||||||
// Connect
|
// Connect
|
||||||
bot.connect();
|
bot.connect();
|
||||||
|
|||||||
Reference in New Issue
Block a user