Obfield

Untitled

Aug 30th, 2020
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var userTickets = new Map();
  2. console.log('Le Bot est en ligne')
  3.  
  4. client.on("messageReactionAdd", async (reaction, user, member, message) =>{
  5.  
  6. if (reaction.message.partial) await reaction.message.fetch();
  7. if (reaction.partial) await reaction.fetch();
  8.  
  9. if (user.bot) return;
  10. if (!reaction.message.guild) return;
  11.  
  12. if (reaction.message.channel.id === "734705729151434792"){
  13.     if (reaction.emoji.name === '✅'){
  14.         const joueur = user.tag;
  15.         let guild = reaction.message.guild;
  16.         reaction.message.guild.channels.create(`📎Discord: ${user.tag}`, {
  17.             type: 'text',
  18.             permissionOverwrites: [
  19.                 {
  20.                     allow: 'VIEW_CHANNEL',
  21.                     id: user.id
  22.                 },
  23.                 {
  24.                     deny: 'VIEW_CHANNEL',
  25.                     id: guild.id
  26.                 },
  27.             ]
  28.         }).then(ch => {
  29.  
  30.             ch.send(
  31.                 {
  32.                     embed: {
  33.                         color: 0xffcf08,
  34.                         title: 'Clôturer la commande ?',
  35.                         fields: [
  36.                             {
  37.                             name: "Si oui",
  38.                             value: '**réagissez avec** :white_check_mark:  ',
  39.                             inline: true
  40.                         }
  41.                     ],
  42.                     footer: {
  43.                         text: '© Anaros all right reserved',
  44.                         icon_url: 'https://i.imgur.com/dpcP8rA.png',
  45.                     },
  46.            
  47.                     }
  48.                 }
  49.             ).then(function (message) {
  50.                 message.react('✅');
  51.             })
  52.         });
  53.     };
  54. }
  55.  
  56.     if (reaction.message.partial) await reaction.message.fetch();
  57.     if (reaction.partial) await reaction.fetch();
  58.  
  59.  
  60.     if (user.bot) return;
  61.     if (!reaction.message.guild) return;
  62.  
  63.     if (!reaction.guild.member(reaction.user).roles.has("734500346663272598")) return message.channel.send('Tu ne peux pas exécuter cette commande');
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74. })
Add Comment
Please, Sign In to add comment