floppy.js

1.0.0 • Public • Published

floppy.js

The Floppy.js Discord API Wrapper

Installation

Stable: npm i floppy.js@latest Daily npm i floppy.js@daily

Usage

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

Readme

Keywords

none

Package Sidebar

Install

npm i floppy.js

Weekly Downloads

0

Version

1.0.0

License

ISC

Unpacked Size

56.7 kB

Total Files

33

Last publish

Collaborators

  • itwithlyam