Advertisement
YoJxsn

Untitled

Nov 4th, 2020
28
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. const BaseCommand = require('../../utils/structures/BaseCommand');
  2. const discord = require("discord.js")
  3. module.exports = class SayCommand extends BaseCommand {
  4. constructor() {
  5. super('say', 'fun', []);
  6. }
  7.  
  8. async run(client, message, args) {
  9. const messageToSay = args.join(" ");
  10. const sayEmbed = new Discord.MessageEmbed()
  11. .setTitle(`${message.author.tag} says: ${messageToSay}`)
  12. .setFooter(message.author.tag ,message.author.displayAvatarURL())
  13. .setColor("#00a170")
  14. .setTimestamp()
  15. .setTimestamp();
  16. try{
  17. await message.channel.send(sayEmbed);
  18. } catch (err) {
  19. console.log(err);
  20. message.channel.send('I am not able to say that message.');
  21. }
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement