All Projects → harmonyland → Harmony

harmonyland / Harmony

Licence: mit
An easy to use Discord API Library for Deno.

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects
js
455 projects
ts
41 projects

Projects that are alternatives of or similar to Harmony

Aegis.cpp
Discord C++ library for interfacing with the API. Join our server:
Stars: ✭ 198 (+83.33%)
Mutual labels:  api, discord
Dsharpplus
A .NET Standard library for making bots using the Discord API.
Stars: ✭ 635 (+487.96%)
Mutual labels:  api, discord
Discordeno
Discord API library for Deno
Stars: ✭ 254 (+135.19%)
Mutual labels:  api, discord
Sharex Upload Server
AKA ShareS - Feature full & Stable ShareX and file server in node. Includes images, videos, code, text, markdown rendering, password protected uploads, logging via discord, administration through Discord, url shortening, and a full front end. Use standalone or via reverse proxy
Stars: ✭ 180 (+66.67%)
Mutual labels:  api, discord
Dimscord
A Discord Bot & REST Library for Nim.
Stars: ✭ 67 (-37.96%)
Mutual labels:  api, discord
Mellow
Mellow can communicate with several APIs like Ombi, Sonarr, Radarr and Tautulli which are related to home streaming to use those services directly in your Discord client.
Stars: ✭ 193 (+78.7%)
Mutual labels:  api, discord
Javacord
An easy to use multithreaded library for creating Discord bots in Java.
Stars: ✭ 368 (+240.74%)
Mutual labels:  api, discord
Api
API for Current cases and more stuff about COVID-19 and Influenza
Stars: ✭ 2,323 (+2050.93%)
Mutual labels:  api, discord
Discord4j
Discord4J is a fast, powerful, unopinionated, reactive library to enable quick and easy development of Discord bots for Java, Kotlin, and other JVM languages using the official Discord Bot API.
Stars: ✭ 973 (+800.93%)
Mutual labels:  api, discord
Discord Bot
🤖 Our BIG help in things about moderation and many more useful stuff on our Discord server.
Stars: ✭ 30 (-72.22%)
Mutual labels:  api, discord
Jda
Java wrapper for the popular chat & VOIP service: Discord https://discord.com
Stars: ✭ 2,598 (+2305.56%)
Mutual labels:  api, discord
Node Sdk
An official module for interacting with the top.gg API
Stars: ✭ 90 (-16.67%)
Mutual labels:  api, discord
Disgord
Go module for interacting with the documented Discord's bot interface; Gateway, REST requests and voice
Stars: ✭ 277 (+156.48%)
Mutual labels:  api, discord
Glasscord
[BUGFIXES ONLY, SUPPORT WILL DROP MAR 1, 2021] Injecting composition effects into Electron applications!
Stars: ✭ 737 (+582.41%)
Mutual labels:  api, discord
Basicbot
A basic example of a Discord Bot written in Python. (discord.py)
Stars: ✭ 73 (-32.41%)
Mutual labels:  api, discord
Discord.jl
The Julia Discord API Wrapper
Stars: ✭ 93 (-13.89%)
Mutual labels:  api, discord
Swiftdiscord
Discord API Client for Swift
Stars: ✭ 103 (-4.63%)
Mutual labels:  discord
Restful Api Guidelines
A model set of guidelines for RESTful APIs and Events, created by Zalando
Stars: ✭ 1,397 (+1193.52%)
Mutual labels:  api
Go Sdk
A composable toolbox of libraries to build everything from CLIs to enterprise applications.
Stars: ✭ 103 (-4.63%)
Mutual labels:  api
Lastversion
Find the latest release version of an arbitrary project
Stars: ✭ 103 (-4.63%)
Mutual labels:  api

banner

An easy to use Discord API Library for Deno

Support


  • Lightweight and easy to use.
  • Complete Object-Oriented approach.
  • Slash Commands supported.
  • Built-in Commands framework.
  • Customizable Caching, with Redis support.
  • Use @decorators to easily make things!
  • Made with ❤️ TypeScript.

Table of Contents

Usage

You can import the package from https://deno.land/x/harmony/mod.ts (with latest version) or can add a version too, and raw GitHub URL (latest unpublished version) https://raw.githubusercontent.com/harmonyland/harmony/main/mod.ts too.

You can also check(not import) the module in https://nest.land/package/harmony (link for importing is in the site).

For a quick example, run this:

deno run --allow-net https://deno.land/x/harmony/examples/ping.ts

And input your bot's token.

Here is a small example of how to use harmony,

import {
  Client,
  Message,
  GatewayIntents
} from 'https://deno.land/x/harmony/mod.ts'

const client = new Client()

// Listen for event when client is ready (Identified through gateway / Resumed)
client.on('ready', () => {
  console.log(`Ready! User: ${client.user?.tag}`)
})

// Listen for event whenever a Message is sent
client.on('messageCreate', (msg: Message): void => {
  if (msg.content === '!ping') {
    msg.channel.send(`Pong! WS Ping: ${client.ping}`)
  }
})

// Connect to gateway
client.connect('super secret token comes here', [
  GatewayIntents.DIRECT_MESSAGES,
  GatewayIntents.GUILDS,
  GatewayIntents.GUILD_MESSAGES
])

Or with CommandClient!

import {
  CommandClient,
  Command,
  CommandContext,
  GatewayIntents
} from 'https://deno.land/x/harmony/mod.ts'

const client = new CommandClient({
  prefix: '!'
})

// Listen for event when client is ready (Identified through gateway / Resumed)
client.on('ready', () => {
  console.log(`Ready! User: ${client.user?.tag}`)
})

// Create a new Command
class PingCommand extends Command {
  name = 'ping'

  execute(ctx: CommandContext) {
    ctx.message.reply(`pong! Ping: ${ctx.client.ping}ms`)
  }
}

client.commands.add(PingCommand)

// Connect to gateway
client.connect('super secret token comes here', [
  GatewayIntents.DIRECT_MESSAGES,
  GatewayIntents.GUILDS,
  GatewayIntents.GUILD_MESSAGES
])

Or with Decorators!

import {
  event,
  CommandClient,
  command,
  CommandContext,
  GatewayIntents
} from 'https://deno.land/x/harmony/mod.ts'

class MyClient extends CommandClient {
  constructor() {
    super({
      prefix: ['!', '!!'],
      caseSensitive: false
    })
  }

  @event()
  ready(): void {
    console.log(`Logged in as ${this.user?.tag}!`)
  }

  @command({ aliases: 'pong' })
  Ping(ctx: CommandContext): void {
    ctx.message.reply('Pong!')
  }
}

new MyClient().connect('super secret token comes here', [
  GatewayIntents.DIRECT_MESSAGES,
  GatewayIntents.GUILDS,
  GatewayIntents.GUILD_MESSAGES
])

Docs

Documentation is available for main (branch) and stable (release).

Found a bug or want support? Join our discord server!

Widget for the Discord Server

Maintainer

@Helloyunho

Contributing

See the contributing file!

Pull Requests are accepted.

Small note: If editing the README, please conform to the standard-readme specification.

License

MIT © 2020-2021 Harmonyland

Made with ❤ by Harmonyland

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].