GithubHelp home page GithubHelp logo

beastiebot's Introduction

BeastieBot V3

The New Beastie is here!

Has:

  • Tmi client for Twitch (library to be replaced)
  • Webhooks server subscribed and listening to Twitch (library to be replaced, DIFFICULT)
  • Twitter client (library to be replaced)
  • Database connection for storing community currency (AWS DynamoDB)
  • Yup for environment variable validation.
  • Prettier for code automagic code formatting.

Setting up the development environment:

  • bot acc = account you want the bot to use when chatting
  • broadcast acc = account you use when you stream
  1. Copy .env.example to .env
  2. Create a twitch account for your bot, if you do not want it to use your broadcaster acc.
  3. Go to https://dev.twitch.tv/console/apps and create a new application.
  4. Set Name to whatever you want to call your bot, OAuth redirect to http://localhost and category to "Chat bot".
  5. Copy your Client ID and Client Secret into the corresponding fields in the .env
  6. Go to https://twitchapps.com/tmi and generate an oauth for your bot acc.
  7. Set the username and oauth of the bot acc in BEASTIE_USERNAME and BEASTIE_OAUTH without the oauth: respectively.
  8. Replace <YourClientId> with your Client Id and follow the link in your browser to create a token for your broadcasting acc
    https://id.twitch.tv/oauth2/authorize?client_id=<YourClientId>&redirect_uri=http://localhost&response_type=token&scope=chat:read+chat:edit+channel:moderate+whispers:read+whispers:edit+channel_editor
    
  9. Copy the token from the redirect url after you have authorized and paste into BROADCASTER_OAUTH along with your username in the BROADCASTER_USERNAME field.
  10. Go to https://discord.com/developers/applications and create a new application
  11. Go to Bot and click "Add Bot" and copy the token into the DISCORD_TOKEN field.
  12. Go to OAuth2 and set redirect url to http://localhost and scope to bot.
  13. Set the permissions as needed (admin is most practical for dev). Copy the URL under scopes and add the bot to your server
  14. Go to General Information and grab the client id and secret and add them to your .env
  15. Set DISCORD_GUILD_NAME to the name of the server you want the bot to run in.
  16. Set DISCORD_WELCOME_CHANNELto name of the channel you want the bot to welcome people in
  17. Set DISCORD_FEED_CHANNEL to the channel you want to use for having the bot post messages to twitter
  18. Set DISCORD_GUILD_MASTER_ID to your discord Id
  19. Run yarn install in the root folder, if you do not have yarn installed you can run npm install followed by yarn install 0 You are set up and ready to start developing!

Setting up dynamoDB to run locally:

Usage:

./run.sh run script that automates dockerization for the app

Future:

  • Clean project of base template packages/scripts/files

  • Refactor project structure by feature

  • Enable Twitter client to post when broadcaster stream state changes to 'live'

  • Add !livestream/!uptime command to display stream data

  • Edit Discord interval to link to discord server

  • Add Discord client to post when broadcaster stream state change to 'live'

  • Add create database script for developers

  • Restart Beastie automatically on shut down

  • Add Raid System/Features

  • Create markdown file with full feature list

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.