This bot reads data from the PokeApi Graphql and responds to Twitch messages with them.
If you want this to run in your twitch channel, send me a message on my discord server.
- Install node.js, yarn (or use npm).
- Clone this repository, and using a terminal navigate to its directory.
- Run
yarn
ornpm install
to install the dependencies.
- Copy the contents of the
.env.example
file to a.env
next to it, and edit it with your values. - Follow this twuorple guide from Twitch bot auth.
- The token json file should be placed in
./tokens/token-CLIENTID.json
.
- The token json file should be placed in
- Run
yarn build
ornpm build
to build the files. - Run
yarn start
ornpm start
to start the application.
- You can run
yarn dev
ornpm dev
to combine the 2 steps above, while listening to changes and restarting automatically.
-
Build:
docker build -t my-app .
Replacing
my-app
with the image name. -
Run
docker run -d -p 3000:3000 my-app
Replacing
my-app
with the image name, and3000:3000
with thehost:container
ports to publish.
- Installing the Eslint (
dbaeumer.vscode-eslint
) and Prettier - Code formatter (esbenp.prettier-vscode
) extensions is recommended.
- Run
yarn lint
ornpm lint
to lint the code. - Run
yarn format
ornpm format
to format the code.
Check the placeholder test examples to get started :
/src/app.ts
that provide a functionsum
/test/app.spec.ts
who test thesum
function
This files are just an example, feel free to remove it
- Run
yarn test
ornpm test
to execute all tests. - Run
yarn test:watch
ornpm test:watch
to run tests in watch (loop) mode. - Run
yarn test:coverage
ornpm test:coverage
to see the tests coverage report.