const {EmbedBuilder} = require('discord.js');

const {Command} = require('../../lib.js')
const channelModel = require('../../models/channels');

    class setcrackwatchchannel extends Command{
        constructor(client){
            super(client, {
                name: 'setcrackwatchchannel',
                group:'admin',
                memberName: 'setcrackwatchchannel',
                hidden:true,
                //! Crack watch is broken Not about to do a reddit crawler for this BS
                description: 'Este comando irá usar o canal indicado para mostrar os updates do site crackwatch. É necessário voltar a usar este comando cada vez que o bot tem uma atialização.'

            })
        }
        async run(message, args){
          //start channel array var
           
            //Check admin privilege
            if(args.length>0)
            {
                sendMessage(0, novo);
            }
            else
            {
                sendMessage(2);
            }
 //Message sending function
    function sendMessage(modifier,channel2)
    {
        const embed = new EmbedBuilder
        embed.setFooter('Rem-chan em ', "https://i.imgur.com/g6FSNhL.png")
        embed.setAuthor("Rem-chan", "https://i.imgur.com/g6FSNhL.png") 
        embed.setColor(0x11080981) // Alterar a cor
        embed.setTimestamp()
        switch (modifier) {
            case 0:
                embed.setTitle('Canal definido')    
        
    
        
                break;
        case 1:
        embed.setTitle('Erro');
        embed.setDescription('Não tem as permissões necessárias.')
                break;
        case 2:
        embed.setTitle('Erro');
        embed.setDescription('Verifique os parametros utilizados.')
                break;
    
            default:
                break;
        }
            message.channel.send({embed});
        }
    }
}module.exports = setcrackwatchchannel;