chore: fancy stuff

This commit is contained in:
Yuzu 2022-07-17 20:54:10 -05:00
parent 94cfd9805c
commit 61cb7b26fb
2 changed files with 20 additions and 0 deletions

View File

@ -17,6 +17,8 @@ pnpm add @oasisjs/biscuit
yarn add @oasisjs/biscuit yarn add @oasisjs/biscuit
``` ```
get a quick bot: `deno run --allow-net https://crux.land/2CENgN [token]`
The biscuit Discord library is built ontop of Discordeno and webspec APIs, we aim to provide portability. Join our The biscuit Discord library is built ontop of Discordeno and webspec APIs, we aim to provide portability. Join our
[Discord](https://discord.gg/zmuvzzEFz2) [Discord](https://discord.gg/zmuvzzEFz2)

18
hello.ts Normal file
View File

@ -0,0 +1,18 @@
// Biscuit Discord library showcase
import Biscuit, { GatewayIntents } from "https://deno.land/x/biscuit/mod.ts";
const intents = GatewayIntents.MessageContent | GatewayIntents.Guilds | GatewayIntents.GuildMessages;
const session = new Biscuit({ token: Deno.args[0], intents });
session.on("ready", ({ user }) => {
console.log("Logged in as: %s!\nUse !ping to get a reply", user.username);
});
session.on("messageCreate", (message) => {
if (message.content.startsWith("!ping")) {
message.reply({ content: "pong!" });
}
});
session.start();