Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- client.on("message", message => {
- if(message.content.toLowerCase() == "!timer 90")
- if(message.member.roles.some(r => r.name === "[ Host ]"))
- {
- message.reply("Timer set for 90 Seconds..")
- let timer = 90;
- const clock = setInterval(() => {
- if(message.content.toLowerCase() == '!timer reset')
- {
- clearInterval(clock)
- message.channel.send("Time Reseted")
- }
- timer--;
- console.log(timer);
- if (timer == 60)
- {
- message.channel.send({embed :{
- color: 3447003,
- title: timer + " Seconds Left"
- }})
- }
- if(timer == 45)
- {
- message.channel.send({embed :{
- color: 3447003,
- title: timer + " Seconds Left"
- }})
- }
- if(timer == 25)
- {
- message.channel.send({embed :{
- color: 3447003,
- title: timer + " Seconds Left"
- }})
- }
- if(timer == 10)
- {
- message.channel.send({embed :{
- color: 3447003,
- title: timer + " Seconds Left"
- }})
- }
- if(timer == 5)
- {
- message.channel.send({embed :{
- color: 3447003,
- title: timer + " Seconds Left"
- }})
- }
- if(timer == 0)
- {
- clearInterval(clock);
- message.channel.send({embed :{
- color: 3447003,
- title: "and thats TIME"
- }})
- }
- }, 1000)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement