1.1.3 • Published 5 years ago

discord-input v1.1.3

Weekly downloads
3
License
ISC
Repository
github
Last release
5 years ago

discord-input

discord-input is a (WIP) javascript package for your discord bot. It creates simple input prompts for users to input values or information.

Table of Contents

  1. Install
  2. How to use

Install

$ npm i discord-input

How to use

Start with the basics of a discord bot (Getting the token, making the files, etc) then, in your main file put this:

const Discord = require('discord.js')
const input = require('discord-input')
const client = new Discord.client()

client.on('ready', () => {
    console.log(`${client.tag} is online!`)
})

client.on('message', message => {
    if (message.content.startsWith() === "!input") {
	    let authorInput = new input.createInput(message);
    }
})
client.login('YOUR_TOKEN')

Now when a user does !input they have 30 seconds to send something, and it will send what they sent!

Note

The content return function isn't working just yet, so it is just set to do this: npm.io

It soon will be set to make the authorInput value set to the input given.

Todo

  • Add a time limit that can be edited (default set to 30 seconds for right now)
  • Add a input expired message that can be edited
  • Add a way to be able to get a value out of the input
1.1.3

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.1.2

5 years ago

1.0.9

5 years ago

1.0.10

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago