{"id":13411076,"url":"https://github.com/harmonyland/harmony","last_synced_at":"2025-04-04T10:05:04.557Z","repository":{"id":39884943,"uuid":"305743861","full_name":"harmonyland/harmony","owner":"harmonyland","description":"An easy to use Discord API Library for Deno.","archived":false,"fork":false,"pushed_at":"2024-08-27T13:41:36.000Z","size":4953,"stargazers_count":324,"open_issues_count":14,"forks_count":49,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-03-30T13:16:07.609Z","etag":null,"topics":["api","deno","discord","discord-api","framework","hacktoberfest","harmony","javascript","js","ts","typescript"],"latest_commit_sha":null,"homepage":"https://harmony.mod.land","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/harmonyland.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"open_collective":"harmony"}},"created_at":"2020-10-20T14:58:42.000Z","updated_at":"2025-03-02T17:50:26.000Z","dependencies_parsed_at":"2023-12-15T17:28:52.870Z","dependency_job_id":"45f9e63a-834e-40ca-8241-119c53367bfd","html_url":"https://github.com/harmonyland/harmony","commit_stats":{"total_commits":993,"total_committers":48,"mean_commits":20.6875,"dds":0.6938569989929506,"last_synced_commit":"b37bf5dcbed321fd1b1b06595e2a4f94be3c8123"},"previous_names":[],"tags_count":32,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harmonyland%2Fharmony","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harmonyland%2Fharmony/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harmonyland%2Fharmony/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harmonyland%2Fharmony/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/harmonyland","download_url":"https://codeload.github.com/harmonyland/harmony/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247128748,"owners_count":20888235,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","deno","discord","discord-api","framework","hacktoberfest","harmony","javascript","js","ts","typescript"],"created_at":"2024-07-30T20:01:11.248Z","updated_at":"2025-04-04T10:05:04.513Z","avatar_url":"https://github.com/harmonyland.png","language":"TypeScript","readme":"![banner](./assets/banner.png)\n\n\u003cp align=center\u003e\u003cb\u003eAn easy to use Discord API Library for Deno and Node.js\u003c/b\u003e\u003c/p\u003e\n\u003cp align=center\u003e\n\u003cimg src=\"https://img.shields.io/badge/standard--readme-OK-green.svg?style=for-the-badge\"/\u003e\n\u003ca href=https://discord.gg/harmony\u003e\n  \u003cimg src=\"https://img.shields.io/discord/783319033205751809.svg?label=Discord\u0026logo=Discord\u0026colorB=7289da\u0026style=for-the-badge\" alt=\"Support\"\u003e\n \u003c/a\u003e\n\u003c/p\u003e\n\u003cbr\u003e\n\n- Lightweight and easy to use\n- Complete Object-Oriented approach\n- Slash Commands supported\n- Built-in Commands framework\n- Customizable Caching, with Redis support\n- `@decorators` supported\n- Made with ❤️ in TypeScript\n\n## Usage (Deno)\n\nYou 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.\n\n## Usage (Node.js)\n\nYou can install and use the NPM package published under `@harmonyland/harmony`.\n\n## Documentation\n\nDocumentation is available [main branch](https://doc.deno.land/https/raw.githubusercontent.com/harmonyland/harmony/main/mod.ts) or [latest stable version](https://doc.deno.land/https/deno.land/x/harmony/mod.ts). You can also check out the [guide](https://harmony.mod.land).\n\n## Example\n\nFor a quick example, run this:\n\n```bash\ndeno run --allow-net https://deno.land/x/harmony/examples/ping.ts\n```\n\nAnd input your bot's token.\n\nHere is a small example of how to use harmony,\n\n```ts\nimport {\n  Client,\n  Message,\n  GatewayIntents\n} from 'https://deno.land/x/harmony/mod.ts'\n\nconst client = new Client({\n  intents: [\n    'GUILDS',\n    'DIRECT_MESSAGES',\n    'GUILD_MESSAGES'\n  ],\n  // token: optionally specify, otherwise DISCORD_TOKEN from env is used\n})\n\n// Listen for event when client is ready (Identified through gateway / Resumed)\nclient.on('ready', () =\u003e {\n  console.log(`Ready! User: ${client.user?.tag}`)\n})\n\n// Listen for event whenever a Message is sent\nclient.on('messageCreate', (msg: Message): void =\u003e {\n  if (msg.content === '!ping') {\n    msg.channel.send(`Pong! WS Ping: ${client.gateway.ping}`)\n  }\n})\n\n// Connect to gateway\nclient.connect()\n```\n\nOr with CommandClient!\n\n```ts\nimport {\n  CommandClient,\n  Command,\n  CommandContext,\n  GatewayIntents\n} from 'https://deno.land/x/harmony/mod.ts'\n\nconst client = new CommandClient({\n  prefix: '!',\n  intents: [\n    'GUILDS',\n    'DIRECT_MESSAGES',\n    'GUILD_MESSAGES'\n  ],\n  // token: optionally specify, otherwise DISCORD_TOKEN from env is used\n})\n\n// Listen for event when client is ready (Identified through gateway / Resumed)\nclient.on('ready', () =\u003e {\n  console.log(`Ready! User: ${client.user?.tag}`)\n})\n\n// Create a new Command\nclass PingCommand extends Command {\n  name = 'ping'\n\n  execute(ctx: CommandContext) {\n    ctx.message.reply(`pong! Ping: ${ctx.client.gateway.ping}ms`)\n  }\n}\n\nclient.commands.add(PingCommand)\n\n// Connect to gateway\nclient.connect()\n```\n\nOr with Decorators!\n\n```ts\nimport {\n  event,\n  CommandClient,\n  command,\n  CommandContext,\n  GatewayIntents\n} from 'https://deno.land/x/harmony/mod.ts'\n\nclass MyClient extends CommandClient {\n  constructor() {\n    super({\n      prefix: ['!', '!!'],\n      caseSensitive: false,\n      intents: [\n        'GUILDS',\n        'DIRECT_MESSAGES',\n        'GUILD_MESSAGES'\n      ],\n      // token: optionally specify, otherwise DISCORD_TOKEN from env is used\n    })\n  }\n\n  @event()\n  ready(): void {\n    console.log(`Logged in as ${this.user?.tag}!`)\n  }\n\n  @command({ aliases: 'pong' })\n  Ping(ctx: CommandContext): void {\n    ctx.message.reply('Pong!')\n  }\n}\n\nnew MyClient().connect()\n```\n\n## Discord\n\nNeed support? Join our Discord Server!\n\n[![Harmony Discord Server](https://discord.com/api/guilds/783319033205751809/widget.png?style=banner1)](https://discord.gg/harmony)\n\n## Maintainer\n\n[@Helloyunho](https://github.com/Helloyunho)\n\n## Contributing\n\nSee [the contributing file](CONTRIBUTING.md)!\n\nPull requests are welcome!\n\nSmall note: If editing the README, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification.\n\n## License\n\n[MIT © 2020-2023 Harmony Land](LICENSE)\n\n#### Made with ❤ by Harmony Land\n","funding_links":["https://opencollective.com/harmony"],"categories":["API Libraries","TypeScript","Libraries"],"sub_categories":["JavaScript","TypeScript"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharmonyland%2Fharmony","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fharmonyland%2Fharmony","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharmonyland%2Fharmony/lists"}