npm.io
1.0.7 • Published 5 years ago

discord-confirm

Licence
MIT
Version
1.0.7
Deps
0
Size
3 kB
Vulns
0
Weekly
0

NPM version NPM downloads

NPM Banner

Installation

$ npm install discord-confirm

DISCORD.JS

Example

Confirm

//INITIALIZATION
const { confirm } = require("discord-confirmation")
//EXAMPLE OF SENDING MESSAGE
message.channel.send("Do you want to send the message?").then(async (message) => {
    const reactions = await confirm(message, message.author, ["✅", "❌"], 10000); //TIME IS IN MILLISECONDS
    if(reactions === "✅") {
        message.channel.send("Hello, my friend")
    }
    if(reactions === "❌") {
        return;
    }
    else {
        console.log("Timed Out")
    }
})

Keywords