commit
7177c5ec01
2 changed files with 42 additions and 21 deletions
63
README.md
63
README.md
|
@ -1,20 +1,24 @@
|
||||||
# harmony
|
![banner](https://cdn.discordapp.com/attachments/783319033730564098/783399012547035176/HarmonyBanner.png)
|
||||||
|
|
||||||
![banner](banner.png)
|
<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>
|
||||||
|
|
||||||
[![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)
|
- Lightweight and easy to use.
|
||||||
|
- Built-in Command Framework,
|
||||||
**An easy to use Discord API Library for Deno.**
|
- Easily build Commands on the fly.
|
||||||
* Lightweight and easy to use.
|
- Completely Customizable.
|
||||||
* Built-in Command Framework,
|
- Complete Object-Oriented approach.
|
||||||
* Easily build Commands on the fly.
|
- 100% Discord API Coverage.
|
||||||
* Completely Customizable.
|
- Customizable caching.
|
||||||
* Complete Object-Oriented approach.
|
- Built in support for Redis.
|
||||||
* 100% Discord API Coverage.
|
- Write Custom Cache Adapters.
|
||||||
* Customizable caching.
|
- Complete TypeScript support.
|
||||||
* 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.
|
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)
|
- [License](#license)
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
Right now, the package is not published anywhere, as its not completely usable.
|
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
|
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:
|
For a quick example, run this:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
deno run --allow-net https://raw.githubusercontent.com/harmony-org/harmony/main/examples/ping.ts
|
deno run --allow-net https://raw.githubusercontent.com/harmony-org/harmony/main/examples/ping.ts
|
||||||
```
|
```
|
||||||
|
|
||||||
And input your bot's token and Intents.
|
And input your bot's token and Intents.
|
||||||
|
|
||||||
Here is a small example of how to use harmony,
|
Here is a small example of how to use harmony,
|
||||||
|
|
||||||
```ts
|
```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()
|
const client = new Client()
|
||||||
|
|
||||||
|
@ -61,11 +73,18 @@ client.connect('super secret token comes here', Intents.All)
|
||||||
```
|
```
|
||||||
|
|
||||||
Or with CommandClient!
|
Or with CommandClient!
|
||||||
|
|
||||||
```ts
|
```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({
|
const client = new CommandClient({
|
||||||
prefix: '!'
|
prefix: '!',
|
||||||
})
|
})
|
||||||
|
|
||||||
// Listen for event when client is ready (Identified through gateway / Resumed)
|
// Listen for event when client is ready (Identified through gateway / Resumed)
|
||||||
|
@ -75,7 +94,7 @@ client.on('ready', () => {
|
||||||
|
|
||||||
// Create a new Command
|
// Create a new Command
|
||||||
class PingCommand extends Command {
|
class PingCommand extends Command {
|
||||||
name = "ping"
|
name = 'ping'
|
||||||
|
|
||||||
execute(ctx: CommandContext) {
|
execute(ctx: CommandContext) {
|
||||||
ctx.message.reply(`pong! Ping: ${ctx.client.ping}ms`)
|
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.
|
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)
|
[![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)!
|
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.
|
Small note: If editing the README, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
[MIT © 2020 Harmony Org](LICENSE)
|
[MIT © 2020 Harmony Org](LICENSE)
|
||||||
|
|
||||||
|
#### Made with ❤ by Harmony-org
|
||||||
|
|
BIN
banner.png
BIN
banner.png
Binary file not shown.
Before Width: | Height: | Size: 1.5 MiB After Width: | Height: | Size: 39 KiB |
Loading…
Reference in a new issue