EnragedPvP

Untitled

Feb 5th, 2021
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. const { MessageEmbed } = require("discord.js");
  2.  
  3. module.exports = {
  4. name: "suggest",
  5. aliases: [],
  6. description: "Make a suggestion and have the community vote",
  7. category: "utility",
  8. usage: "suggest <suggestion>",
  9. run: async (client, message, args) => {
  10. let suggestion = args.slice(0).join(" ");
  11. let SuggestionChannel = message.guild.channels.cache.find(channel => channel.name === "suggestions");
  12. if (!SuggestionChannel) return message.channel.send("Please create a channel named suggestions before using this command!");
  13. const embed = new MessageEmbed()
  14. .setTitle("New Suggestion")
  15. .setDescription(suggestion)
  16. .setColor("RANDOM")
  17. .setFooter(`${message.author.tag} | ID: ${message.author.id}`)
  18. .setTimestamp()
  19. SuggestionChannel.send(embed).then(msg => {
  20. msg.react("👍🏼")
  21. msg.react("👎🏼")
  22. message.channel.send("Your suggestion has been sent!");
  23. });
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment