The Floppy.js Discord API Wrapper
Stable:
npm i floppy.js@latest
Daily
npm i floppy.js@daily
Example
const Floppy = require("floppy.js")
const { token } = require("./token.json")
const bot = new Floppy.Bot()
bot.on("READY", async () => {
console.log("Ready!")
await bot.createStatus("watching", "FloppyJS", "idle")
console.log("Status set!")
})
bot.on("GUILD_CREATE", async guild => {
console.log("Logged onto guild:", guild.name)
console.log(await guild.getChannels())
})
bot.on("MESSAGE_CREATE", async message => {
if (message.author.bot) return
console.log("New message:", message.content)
if (message.content === "ping") {
await message.createReply("Pong!")
}
})
bot.start(token)
See the Docs at https://floppy.js.org