Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const Discord = require("discord.js");
- module.exports.run = async(bot, message, args) => {
- if (message.member.hasPermission("ADMINISTRATOR")) {
- if(!message.member.hasPermission("ADMINISTRATOR"))
- return message.reply(`${message.author} You dont have permission to use this command`)
- message.delete()
- const text = args.join(" ")
- if (text.length < 1) return message.channel.send("Cannot announce nothing");
- const colour = args.slice(2).join(" ");
- let announceEmbed = new Discord.RichEmbed()
- .setTitle("Announcement")
- .setColor("#ff0000")
- .addField("Announced By", `${message.author}`)
- .setDescription(text);
- let announcechannel = message.guild.channels.find(`name`, "announcements");
- if(!announcechannel) return message.reply("Couldn't find channel");
- announcechannel.send(`@everyone`)
- announcechannel.send(announceEmbed);
- }};
- module.exports.help = {
- name: "announce"
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement