Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. //intercepta mensagem do chat
  2. function mensagemChegou(alvo, contexto, mensagem, ehBot) {
  3. if (ehBot) {
  4. return; //se for mensagens do nosso bot ele não faz nada
  5. }
  6.  
  7. const nomeDoComando = mensagem.trim();// remove espaço em branco da mensagem para verificar o comando
  8. // checando o nosso comando
  9. if (nomeDoComando === '!comandoUM') {
  10. console.log(`* Foi Executado o comando ${nomeDoComando}`);
  11. } else if (nomeDoComando === '!comandoDOIS') {
  12. console.log(`* Foi Executado o comando ${nomeDoComando}`);
  13. } else {
  14. console.log(`* Não conheço o comando ${commandName}`);
  15. }
  16. }
  17.  
  18. function entrouNoChatDaTwitch(endereco, porta) {
  19. console.log(`* Bot entrou no endereço ${endereco}:${porta}`);
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement