mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-01 20:46:08 +00:00
19 lines
565 B
TypeScript
19 lines
565 B
TypeScript
// 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();
|