Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

java script discord timer

const helloSet = new Set();

bot.on('message', msg => {
  let args = msg.content.substring(prefix.length).split(" ");
  if(args[0] === 'hello'){
    if(helloSet.has(msg.author.id)){
      msg.channel.send(`Please wait 10 seconds before using this command again.`)
      setTimeout(() => {
        helloSet.delete(msg.author.id)
      }, 10000)
    } else {
      msg.channel.send(`Hello!`)
      helloSet.add(msg.author.id)
    }
  }
})
Comment

PREVIOUS NEXT
Code Example
Javascript :: javascript change color of button onclick 
Javascript :: SHOPIFY CUSTOMER WITH REGISTRATION 
Javascript :: react native assembleRelease is not working 
Javascript :: como gerar numeros aleatorios em javascript a partir de uma função 
Javascript :: cara install parrot os di virtualbox 
Javascript :: link js filt to html file 
Javascript :: JS equal sibling btns height 
Javascript :: how to make a dot function javascript 
Javascript :: simple form in react native with code 
Javascript :: how to import images from public folder in react js 
Javascript :: js array map and update tat array value 
Javascript :: JS mixin implementation 
Javascript :: class function constructor 
Javascript :: javascript get hours and minutes from date 
Javascript :: actual jquery 
Javascript :: random color javascript 
Javascript :: javascript add content to array 
Javascript :: vue compositon api reusable code reuse code 
Javascript :: toggle checkbox react boolean 
Javascript :: javascript Least prime factor of numbers till n 
Javascript :: Load RequireJS Script 
Javascript :: convert js to tsx 
Javascript :: List content on thee currentwdr 
Javascript :: concat vs spread 
Javascript :: google apps script parse html 
Javascript :: prisma.db yaml 
Javascript :: jquery remove duplicates 
Javascript :: menu with dynamic submenu in javascript 
Javascript :: grouping related html form input 
Javascript :: load content on user language in javascript 
ADD CONTENT
Topic
Content
Source link
Name
7+5 =