Skip to content

Commit 57d7074

Browse files
committed
docs: add examples
1 parent 2051f6e commit 57d7074

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,30 @@
22

33
Create Discord Bot with ease and simplicity.
44

5+
## Examples
6+
7+
#### Command
8+
`commands/ping.ts`
9+
```ts
10+
import { defineCommand } from '@harmonix-js/core'
11+
12+
export default defineCommand({
13+
description: 'Ping command'
14+
}, (client, message) => {
15+
message.reply('Pong!')
16+
})
17+
```
18+
19+
#### Event
20+
`events/ready.ts`
21+
```ts
22+
import { defineEvent } from '@harmonix-js/core'
23+
24+
export default defineEvent((client) => {
25+
console.log('Bot is ready!')
26+
})
27+
```
28+
529
## License
630

731
Published under the [MIT](https://github.com/harmonix-js/core/blob/main/LICENSE) license.

0 commit comments

Comments
 (0)