Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const Discord = require("discord.js");
- const fs = require("fs");
- let id = JSON.parse(fs.readFileSync("./ids.json", "utf8"));
- module.exports.run = async (bot, message, args) => {
- if(!message.member.hasPermission("ADMINISTRATOR")) return message.reply("관리자 권한이 필요합니다 (2)");
- let addchannel = message.channel(message.mentions.channels.first()) || message.guild.channels.get(args[0])
- if(!addchannel) return message.reply("Couldn't find");
- if(!id[addchannel.id]) warnsa[addchannel.id] = {
- id: message.channel.id
- };
- id[addchannel.id].warns = id[addchannel.id].warns + 1;
- fs.writeFile("./ids.json", JSON.stringify(addchannel.id), (err) => {
- if (err) console.log(err)
- });
- let channelEmbed = new Discord.RichEmbed()
- .setTitle("Notification settings")
- .setAuthor(message.author.username)
- .setColor("#fc6400")
- .addField("Channel", `${message.channel}`)
- message.channel.send(channelEmbed);
- }
- module.exports.help = {
- name: "debug.addid"
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement