toowake

hug.js

Apr 7th, 2023
307
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. const { SlashCommandBuilder, EmbedBuilder } = require("discord.js");
  2.  
  3. module.exports = {
  4. data: new SlashCommandBuilder()
  5. .setName("hug")
  6. .setDescription("hug a discord member")
  7. .addUserOption(option => option
  8. .setName("user")
  9. .setDescription("the user you want to hug")
  10. .setRequired(true)
  11. ),
  12.  
  13. async execute (interaction) {
  14. const links = [
  15. "https://media.tenor.com/kCZjTqCKiggAAAAC/hug.gif",
  16. "https://i.gifer.com/2QEa.gif",
  17. "https://gifdb.com/images/high/anime-hug-date-a-live-z8yqrk7wlwo3v8ql.gif",
  18. "https://media.tenor.com/1T1B8HcWalQAAAAC/anime-hug.gif",
  19. "https://i.pinimg.com/originals/b6/2f/04/b62f047f8ed11b832cb6c0d8ec30687b.gif",
  20. "https://media.tenor.com/iyztKN68avcAAAAM/aharen-san-aharen-san-anime.gif",
  21. "https://aniyuki.com/wp-content/uploads/2022/06/anime-hugs-aniyuki-55.gif",
  22. ];
  23.  
  24. const choice = Math.floor(Math.random() * links.length);
  25.  
  26. const user = interaction.options.getUser("user");
  27.  
  28. const link = `${links[choice]}`;
  29.  
  30. const embed = new EmbedBuilder()
  31. .setThumbnail(`${link}`)
  32. .setColor("Red")
  33. .addFields({
  34. name: "You hugged",
  35. value: `<@${user.id}>`,
  36. inline: true
  37. })
  38. .setTimestamp()
  39.  
  40. return await interaction.reply({ embeds: [embed]})
  41. }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment