slurpcord
Version:
Simple API wrapper for Discord
18 lines (13 loc) • 400 B
JavaScript
import { Bot, SlashCommand } from "slurpcord";
const bot = new Bot("DISCORD_TOKEN", "PREFIX");
const pingcommand = new SlashCommand()
.setName("ping")
.setDescription("Pong!");
bot.ready(() => {
bot.setCommands([pingcommand]);
console.log(`Logged in as ${bot.user.tag}`);
});
bot.slashCommand("ping", async (cmd) => {
await cmd.reply("Pong!");
})
bot.start()