feat(update readme)
This commit is contained in:
parent
c277f67b75
commit
5323a6a841
1 changed files with 41 additions and 20 deletions
61
README.md
61
README.md
|
@ -1,20 +1,24 @@
|
|||
# harmony
|
||||
|
||||
![banner](banner.png)
|
||||
|
||||
[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme) [![Discord](https://img.shields.io/discord/591914197219016707.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.gg/WVN2JF2FRv)
|
||||
<p align=center><i><b>An easy to use Discord API Library for Deno</b></i></p>
|
||||
<p align=center>
|
||||
<img src="https://img.shields.io/badge/standard--readme-OK-green.svg?style=for-the-badge"/>
|
||||
<a href=https://discord.gg/WVN2JF2FRv>
|
||||
<img src="https://img.shields.io/discord/783319033205751809.svg?label=Discord&logo=Discord&colorB=7289da&style=for-the-badge" alt="Support">
|
||||
</a>
|
||||
</p>
|
||||
<br>
|
||||
|
||||
**An easy to use Discord API Library for Deno.**
|
||||
* Lightweight and easy to use.
|
||||
* Built-in Command Framework,
|
||||
* Easily build Commands on the fly.
|
||||
* Completely Customizable.
|
||||
* Complete Object-Oriented approach.
|
||||
* 100% Discord API Coverage.
|
||||
* Customizable caching.
|
||||
* Built in support for Redis.
|
||||
* Write Custom Cache Adapters.
|
||||
* Complete TypeScript support.
|
||||
- Lightweight and easy to use.
|
||||
- Built-in Command Framework,
|
||||
- Easily build Commands on the fly.
|
||||
- Completely Customizable.
|
||||
- Complete Object-Oriented approach.
|
||||
- 100% Discord API Coverage.
|
||||
- Customizable caching.
|
||||
- Built in support for Redis.
|
||||
- Write Custom Cache Adapters.
|
||||
- Complete TypeScript support.
|
||||
|
||||
Note: Library is yet under development and not completely usable. You're still always welcome to use, but there may be breaking changes.
|
||||
|
||||
|
@ -28,18 +32,26 @@ Note: Library is yet under development and not completely usable. You're still a
|
|||
- [License](#license)
|
||||
|
||||
## Usage
|
||||
|
||||
Right now, the package is not published anywhere, as its not completely usable.
|
||||
You can import it from this Raw GitHub URL: https://raw.githubusercontent.com/harmony-org/harmony/main/mod.ts
|
||||
|
||||
For a quick example, run this:
|
||||
|
||||
```bash
|
||||
deno run --allow-net https://raw.githubusercontent.com/harmony-org/harmony/main/examples/ping.ts
|
||||
```
|
||||
|
||||
And input your bot's token and Intents.
|
||||
|
||||
Here is a small example of how to use harmony,
|
||||
|
||||
```ts
|
||||
import { Client, Message, Intents } from 'https://raw.githubusercontent.com/harmony-org/harmony/main/mod.ts'
|
||||
import {
|
||||
Client,
|
||||
Message,
|
||||
Intents,
|
||||
} from 'https://raw.githubusercontent.com/harmony-org/harmony/main/mod.ts'
|
||||
|
||||
const client = new Client()
|
||||
|
||||
|
@ -61,11 +73,18 @@ client.connect('super secret token comes here', Intents.All)
|
|||
```
|
||||
|
||||
Or with CommandClient!
|
||||
|
||||
```ts
|
||||
import { CommandClient, Command, CommandContext, Message, Intents } from 'https://raw.githubusercontent.com/harmony-org/harmony/main/mod.ts'
|
||||
import {
|
||||
CommandClient,
|
||||
Command,
|
||||
CommandContext,
|
||||
Message,
|
||||
Intents,
|
||||
} from 'https://raw.githubusercontent.com/harmony-org/harmony/main/mod.ts'
|
||||
|
||||
const client = new CommandClient({
|
||||
prefix: '!'
|
||||
prefix: '!',
|
||||
})
|
||||
|
||||
// Listen for event when client is ready (Identified through gateway / Resumed)
|
||||
|
@ -75,7 +94,7 @@ client.on('ready', () => {
|
|||
|
||||
// Create a new Command
|
||||
class PingCommand extends Command {
|
||||
name = "ping"
|
||||
name = 'ping'
|
||||
|
||||
execute(ctx: CommandContext) {
|
||||
ctx.message.reply(`pong! Ping: ${ctx.client.ping}ms`)
|
||||
|
@ -93,7 +112,7 @@ client.connect('super secret token comes here', Intents.All)
|
|||
|
||||
Not made yet.
|
||||
|
||||
## Discord
|
||||
## Found a bug or want support? Join our discord server!
|
||||
|
||||
[![Widget for the Discord Server](https://discord.com/api/guilds/783319033205751809/widget.png?style=banner1)](https://discord.gg/WVN2JF2FRv)
|
||||
|
||||
|
@ -105,10 +124,12 @@ Not made yet.
|
|||
|
||||
See [the contributing file](CONTRIBUTING.md)!
|
||||
|
||||
PRs are accepted.
|
||||
Pull Requests are accepted.
|
||||
|
||||
Small note: If editing the README, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification.
|
||||
|
||||
## License
|
||||
|
||||
[MIT © 2020 Harmony Org](LICENSE)
|
||||
|
||||
#### Made with ❤ by Harmony-org
|
||||
|
|
Loading…
Reference in a new issue