Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. const Discord = require("discord.js");
  2.  
  3. module.exports.run = async (bot, message, args) => {
  4.  
  5. if(!message.member.hasPermission(["MANAGE_MESSAGES" , "ADMINISTRATOR"])) return message.channel.send("You cannot use this command!")
  6.  
  7. let argsresult;
  8. let mChannel = message.mentions.channels.first()
  9.  
  10. message.delete()
  11. if(mChannel) {
  12. argsresult = args.slice(1).join(" ")
  13. mChannel.send(argsresult)
  14. } else {
  15. argsresult = args.join(" ")
  16. message.channel.send(argsresult)
  17. }
  18.  
  19. }
  20.  
  21. module.exports.config = {
  22. name: "say",
  23. aliases: ["Sends a message that was inputted to a channel"],
  24. usage: "!say",
  25. description: "The bot says what you want it to.",
  26. accesableby: "Moderator",
  27. notworking: "Working Or not Working"
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement