⚠️ Work in progress. Expect breaking changes.
Denord is a module to interact with the discord API.
For event handling, the event module is used.
import { Client } from "https://deno.land/x/denord/src/client.ts";
const client = new Client();
await client.connect("TOKEN");
console.log("ready");
for await (const [channel, message] of client.asyncOn("messageCreate")) {
if (message.content === "!ping") {
channel?.sendMessage({
content: `${message.author.mention} pong`,
});
}
}
- crowlKats (@crowlKats)
- Filippo Rossi (@qu4k)
Pull request, issues and feedback are very welcome. Code style is formatted with
deno fmt
and commit messages are done following Conventional Commits spec.
Copyright 2020-present, the denosaurs team. All rights reserved. MIT license.