Change color of text Discord [BOT]

Asked

Viewed 14,191 times

1

I am trying to change the color of the text after cleaning in Discord chat. Example:

!cclear

(CHAT SUCCESSFULLY CLEANNED! ) <-- Appears in green color.

My code so far:

const Discord = require('discord.js');
const bot = new Discord.Client();
const pre = '!';

bot.on('message', (Message) =>{

    if(Message.content == pre + 'ping'){
        Message.channel.sendMessage('Pong!');
    }

    if(Message.content == pre + 'cclear'){
        Message.channel.bulkDelete(100);
        Message.channel.sendMessage('Chat successfully cleanned!');
    }

    if(Message.content == pre + 'commands'){
        Message.channel.sendMessage('!cclear [Limpa o chat do canal!]');
        Message.channel.sendMessage('!ping');
        Message.channel.sendMessage('!');
    }
});
  • You can insert an event into onclick that changes the value of css.display to the desired color

1 answer

0


Browser other questions tagged

You are not signed in. Login or sign up in order to post.