SHARE
TWEET

Untitled

a guest May 26th, 2019 113 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const Discord = require('discord.js');
  2. const client = new Discord.Client();
  3.  
  4. client.on('ready', () => {
  5.     console.log(`Connected on ${client.user.tag}`)
  6. })
  7.  
  8. client.on('message', message => {
  9.     if (message.content === '!support') {
  10.         message.delete()
  11.  
  12.         message.channel.send(embed).then(message => {
  13.             message.react('🎫')
  14.         })
  15.  
  16.     }
  17. })
  18.  
  19. client.on('messageReactionAdd', (reaction, user) => {
  20.     let server = reaction.message.guild
  21.  
  22.     if (reaction.emoji.name === '🎫' && user.id !== client.user.id) {
  23.         server.createChannel("ticket " + user.tag).then(channel => {
  24.             client.channels.get(channel.id).send(ticketEmbed)
  25.  
  26.  
  27.             const filter = m => m.content.startsWith(!ticket);
  28.  
  29.             channel.awaitMessages(filter, {
  30.                     max: 1,
  31.                     time: 10000,
  32.                     errors: ['time']
  33.                 })
  34.                 .then(collected => console.log(`Tu as dit : "${collected.first().content}".`))
  35.  
  36.         })
  37.  
  38.  
  39.     }
  40. })
  41.  
  42.  
  43.  
  44. client.login('token')
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top