Bot criado na live twitch.tv/444jeans

Overview

Bot da Live

O Bot da Live foi um bot criado na live twitch.tv/444jeans com o foco em ensinar conceitos de programação utilizando o bot como um meio. Para a criação do bot foi utilizado Node.js e tmi.js.

Utilizando o bot

Para baixar o código, execute:

git clone [email protected]:jlcarvalho/bot-da-live.git

Para rodar o bot, faça uma cópia do arquivo .env.sample e salve como .env e adicione as variáveis de ambiente requeridas.

  • TWITCH_BOT = Nome do usuário do bot
  • TWITCH_TOKEN = Token de autenticação do bot, pode ser gerado em https://twitchapps.com/tmi/
  • CHANNEL = Nome de usuário do canal onde o bot irá rodar

Após configurar as variáveis de ambiente, certique-se de que o Node.js está instalado, navegue até o diretório do projeto e rode:

npm install
npm start

Lives

Live 1

  • Criar projeto no Glitch.com
  • Criar conta do bot na Twitch
  • Pegar token do bot em https://twitchapps.com/tmi/
  • Ler mensagens do chat do canal usando o bot
  • Identificar comandos entre as mensagens do chat
  • Criar comandos (!cafe, !dado, !legal, !patch, !ping, etc.)

Live 2

  • Revisar o que fizemos na live passada
  • Configurar um ambiente de dev
    • Instalar o Node.js
    • Instalar o Visual Studio Code
    • Configurar um linter
    • Configurar auto-reload
  • Organizar o código
  • Criar comandos novos (!tela, !d6), alguns usando expressão regular

Live 3

  • Começar a usar uma ferramenta de versionamento de código (git)
  • Descrever como usar o bot no README.md
  • Implementar git hooks para rodar o linter

Live 4

  • Criar overlays baseados em eventos da live
    • Subs
    • Resubs
    • Bits
    • Raids

Live 5 e Live 6

  • Implementar testes automatizados
    • Lógica de controle dos comandos
    • Comando !café
    • Comando !dado
    • Comando !legal
    • Comando !patch
    • Comando !ping
    • Comando !tela
    • Lógica de controle dos timers
    • Timer água
    • Alerts
    • server.js
Comments
  • Implementação do alerta de resub

    Implementação do alerta de resub

    Implementação da funcionalidade de escutar o evento de resub no canal.

    Eu acredito que essa não seja a melhor forma de ser feita, podemos agrupar os eventos em um object e acessar pela propriedade, já que o comportamento a principio é o mesmo ou colocar dentro de uma function recebendo alguns params como valor de opacidade e time.

    Mas o que você acha?

    Closes https://github.com/jlcarvalho/bot-da-live/issues/1

    opened by Limatucano 5
  • Implementação do alerta de cheer

    Implementação do alerta de cheer

    Não testei, na real perdi umas live e não to sacando muito bem o código.

    Me baseei no que já tinha pronto e no PR aberto do @Limatucano.

    Closes https://github.com/jlcarvalho/bot-da-live/issues/2

    opened by narcello 4
  • [FEAT] Implementar alerta de raid

    [FEAT] Implementar alerta de raid

    O código inicial de disparo do evento de raid já está implementado em modules\alerts\index.js, mas precisamos distinguir o evento em assets\alerts.html e exibir a mensagem adequada.

    good first issue 
    opened by jlcarvalho 1
  • [FEAT] Implementar alerta de resub

    [FEAT] Implementar alerta de resub

    O código inicial de disparo do evento de resub já está implementado em modules\alerts\index.js, mas precisamos distinguir o evento em assets\alerts.html e exibir a mensagem adequada.

    good first issue 
    opened by jlcarvalho 1
  • fix: resolve notificações duplicadas quando há mais de um cliente

    fix: resolve notificações duplicadas quando há mais de um cliente

    Acredito que a maneira mais fácil de resolver esse problema é fazer broadcast para todos os clientes conectados ao socket em vez de emitir de maneira individual. Como o bot não reage aos eventos de connect e disconnect, não teria prejuízo.

    https://socket.io/docs/v4/broadcasting-events https://socket.io/docs/v4/server-api/#namespaceemiteventname-args

    Closes #4

    opened by lucasintel 0
  • ci: ajusta configuração do github actions

    ci: ajusta configuração do github actions

    O evento pull_request executa o workflow quando o PR é aberto ou quando o head do branch do PR é alterado.

    https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request

    opened by lucasintel 0
  • test: adiciona testes do comando !café

    test: adiciona testes do comando !café

    Para criar esses testes foi necessário a utilização do memdown, que é a implementação em memória do leveldown.

    Esse PR resolve a issue: https://github.com/jlcarvalho/bot-da-live/issues/5

    opened by jlcarvalho 0
  • [TEST] Criar testes para o comando !café

    [TEST] Criar testes para o comando !café

    Precisamos implementar as specs do comando !café, para isso será necessário testar as expressões regulares do trigger e instanciar o leveldb em memória (será necessário pesquisar como fazer isso) para passar pro comando.

    good first issue 
    opened by jlcarvalho 0
  • [BUG] Separar notificação do chat do alerta no overlay

    [BUG] Separar notificação do chat do alerta no overlay

    Quando temos mais de 1 cliente conectado ao socket (ex.: OBS e Navegador), e um dos eventos é disparado, nós acabamos disparando a mensagem no chat duas vezes.

    Isso acontece pois para cada conexão do socket nós ficamos escutando os eventos da Twitch e enviamos a mensagem relacionada no chat (seta vermelha), quando deveríamos exibir apenas o alerta no overlay (seta laranja), então se tivermos 8 clientes conectados, enviaremos 8 mensagens no chat.

    image

    Uma possível solução é separar o momento em que a mensagem para o chat é enviada, já que também precisamos dela, do momento em que o alerta é exibido no overlay.

    good first issue 
    opened by jlcarvalho 0
  • [FEAT] Implementar alerta de cheer

    [FEAT] Implementar alerta de cheer

    O código inicial de disparo do evento de cheer já está implementado em modules\alerts\index.js, mas precisamos distinguir o evento em assets\alerts.html e exibir a mensagem adequada.

    good first issue 
    opened by jlcarvalho 0
Owner
Jean Lucas de Carvalho
Jean Lucas de Carvalho
Olá, esse bot de whatsapp foi criado com foco em atendimento ao cliente.

Olá, bem vindo! ?? Olá, esse bot de whatsapp foi criado com foco em atendimento ao cliente. Instalando bot git clone https://github.com/kaualandi/wabo

Kauã Landi 4 Jun 17, 2022
Easy and simple twitch bot in node.js.. very very easy..

How It Works identity: { username: 'YOUR BOTS USERNAME', <-- This is where you place the username that you gave the bot account password: '

Ventispurr 3 Dec 18, 2021
A simple bot for twitch, which has a silly AI in places. The library "cleverbot-free" is used for AI.

AITwitchChat A simple bot for twitch, which has a silly AI in places. The library "cleverbot-free" is used for AI. Requiments tmi.js Node.js 16.6.0 or

DesConnet 4 Dec 7, 2022
A multipurpose bot, a clan bot, a all in one bot. The one bot u need for ur server originally made as Milrato discord Bot and by Tomato6966.

Public Bot and Support Server! Invite the Public Version of this Bot so you don't need to host it by yourself or join my Discord server to get a custo

Tomato6966 472 Dec 25, 2022
A React component for playing a variety of URLs, including file paths, YouTube, Facebook, Twitch, SoundCloud, Streamable, Vimeo, Wistia and DailyMotion

ReactPlayer A React component for playing a variety of URLs, including file paths, YouTube, Facebook, Twitch, SoundCloud, Streamable, Vimeo, Wistia, M

Pete Cook 7.2k Jan 4, 2023
Twitch-webos - Trying to be a better TwitchTV-App

twitch-webos This should be a better TwitchTV-App without lagging of features like VODs. Credits Skeleton from https://github.com/webosbrew/youtube-we

null 3 Mar 24, 2022
A web app for seeing your recent Twitch chat mentions and/or other tracked words amongst channels you follow.

Mentions A web app for seeing your recent Twitch chat mentions and/or other tracked words amongst channels you follow. Requirements NodeJS. Client ID

Ravenbtw 3 Dec 22, 2022
The game we're working on every Tuesday at 6pm at http://twitch.tv/jutanium

Usage Those templates dependencies are maintained via pnpm via pnpm up -Lri. This is the reason you see a pnpm-lock.yaml. That being said, any package

Dan Jutan 7 Dec 8, 2022
New base bot WhatsApp 🈴 bukan self bot lagi atau buka bot yang bisa di pakai oleh bot sendiri 😎

Installation • Thanks to • Donate Official Group Bot • Settings Instalasi Heroku Buildpack Click the deploy icon below ! > heroku/nodejs > https://g

zeeone 27 Feb 9, 2022
NEW⚡ PancakeSwap Prediction Bot using AI live recommendations. ~70% Win rate 🔮

?? PancakeSwap Prediction SmartBot PancakeSwap Prediction Bot using live TradingView AI recomendations. ~70% Win rate. ⭐ Please consider giving a star

AladeenCR 7 Jun 14, 2022
Discord-Bot - You can use the discord bot codes that are updated in every video of the codes I use in the discord bot making series that I have published on my youtube channel.

Discord-Bot You can use the discord bot codes that are updated in every video of the codes I use in the discord bot making series that I have publishe

Umut Bayraktar 114 Jan 3, 2023
It is a discord bot bot which can play lofi song in different language 24/7. It has premium system and cool embed looks with buttons. It can play youtube songs, playlists. This bot code was made by Supreme#2401. It uses djs V12

Lofi-Radio-Music-Bot It is a discord bot bot which can play lofi song in different language 24/7. It has premium system and cool embed looks with butt

Diwas Atreya 89 Jan 2, 2023
Ini Adalah Tools Bot WhatsApp,Pengodean Ulang Dari Sc Bot Kanna Bot

Node Modules Belum Selesai Unduh File Bot Lengkap Node Modules Click Here Lord Bot FOR DEPLOY HEROKU USER Instal Buildpack heroku/nodejs https://githu

Creator Lord-Botz 8 Jul 1, 2022
This bot can raise your mood. This bot send joke often our channel for users. Sometimes bot don't work because we have not server for this project...)

Hi, welcome to send-joke-bot telegram bot project ?? What can do this bot ? This bot can raise your mood. This bot send joke often our channel for use

Muhammadamin 5 Sep 26, 2022
HTML5 fmp4 live stream (ll-fmp4) player written in TypeScript

umataste HTML5 fmp4 live stream (ll-fmp4) player written in TypeScript Feature Playback for fmp4 stream Extremely low latency of less than 0.1 second

もにょ~ん 5 Oct 21, 2022
A bot Similar to the reaction roles discord bot, but free. Written in JavaScript, and uses MongoDB.

Discord Reaction Roles bot About • Features • Installation • Setting Up About An open source reaction roles bot to anyone who needs one in their serve

null 52 Dec 22, 2022
Açık kaynaklı bir discord bot list botu. Bot list sunucularına özel yapılmıştır. Tanıtım videosu MoTion42 Kanalında bulunuyor. Umarım beğenirsiniz.

?? Bot Bilgilendirme Açık kaynaklı bir discord bot list botu. Bot list sunucularına özel yapılmıştır. Tanıtım videosu MoTion42 Kanalında bulunuyor. Um

`Motion 1 Sep 11, 2021
Bot sviluppato in Node.js che permette la prenotazione e il successivo invio dello screenshot di quest'ultima tramite un bot di telegram.

Unimore-Bot Bot sviluppato in Node.js che permette la prenotazione e il successivo invio dello screenshot di quest'ultima tramite un bot di telegram I

Lorenzo Codeluppi 8 Jun 9, 2022
A Discord bot library to make the development of a bot a little bit easier.

Discord Bot Framework (DBF) A basic Discord bot framework to allow for easier creation of bots. With this library, you can easily parse and handle com

Yoo-Babobo 1 Dec 23, 2021