Obfield

Untitled

Sep 14th, 2020
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. client.on("messageReactionAdd", async (reaction, user, member, message) =>{
  2.     if (reaction.message.partial) await reaction.message.fetch();
  3.     if (reaction.partial) await reaction.fetch();
  4.    
  5.  
  6.     if (user.bot) return;
  7.     if (!reaction.message.guild) return;
  8.  
  9.     if (reaction.message.channel.id === "735515835874934825"){
  10.         if (reaction.emoji.id === '754759103913656395'){
  11.             let guild = reaction.message.guild;
  12.             reaction.message.guild.channels.create(`💻${user.tag}`, {
  13.                 type: 'text',
  14.                 permissionOverwrites: [
  15.                     {
  16.                         allow: 'VIEW_CHANNEL',
  17.                         id: user.id
  18.                     },
  19.                     {
  20.                         deny: 'VIEW_CHANNEL',
  21.                         id: guild.id
  22.                     },
  23.                 ]
  24.             })
  25.         };
  26.     }
  27.     client.channels.cache.get('754737452165496954').send({
  28.         embed: {
  29.             color: 3066993,
  30.             title: `Création de ticket`,
  31.             fields: [
  32.                 {
  33.                 name: "test",
  34.                 value: `${user.tag}`,
  35.                
  36.             },
  37.             {
  38.                 name: "Crée à",
  39.                 value: new Date(),
  40.             }
  41.         ],
  42.         footer: {
  43.             text: '© Anaros all right reserved',
  44.             icon_url: 'https://i.imgur.com/dpcP8rA.png',
  45.         },
  46.    
  47.         }
  48.     });
  49.  
  50. })
Add Comment
Please, Sign In to add comment