Giter Site home page Giter Site logo

ma7dev / onlysudo Goto Github PK

View Code? Open in Web Editor NEW
16.0 4.0 1.0 94.19 MB

A Discord/Twitch bot that uses AI models to do some cool stuff.

JavaScript 0.63% Python 5.86% Jupyter Notebook 93.11% C++ 0.02% Cuda 0.15% Shell 0.02% HTML 0.19% EJS 0.03%
discordjs tmijs bot ai discord-bot twitch twitch-api twitch-bot discord nodejs

onlysudo's Introduction

OnlySudo

โญ Star us on GitHub โ€” it motivates us a lot!

This is a Discord/Twitch bot that uses AI models to do some cool stuff.

Here are the list of AI models that were used in this project.

Table of content

Installation

Discord/Twitch/Server installation

  • Clone the repo on your machine using git or use this link to download a .zip file of the project.
  • Install Node.js.
  • Access the project folder and create .env file. Follow .env file setup.
  • Edit the following:
    • Line 4 in src/index.js to include the right channels where the bot will be join.
  • Open src from the terminal and run the following:
# to install packages
npm i
# to run the server
nodemon

AI models installation

  • Install Python Python 3.7 or greater.
  • Install required packages for each AI model. Follow AI models setup.

TODO

Setup

.env file setup

The content of the .env would be the following:

# development
PORT=5000
BASE_URL=http://localhost:5000

# General
PREFIX=!

# Discord bot
DISCORD_CLIENT_ID=XXX
DISCORD_TOKEN=XXX
DISCORD_GUILD_ID=XXX

# Twitch bot
TWITCH_ACCESS_TOKEN=XXX
TWITCH_CLIENT_ID=XXX
TWITCH_BOT_USERNAME=XXX

Instructions to get the required values:

  • DISCORD_CLIENT_ID and DISCORD_TOKEN:
    • Access Developer Portal then create a New Application if you don't have a bot already
    • Click on the bot
      • Select OAuth2 then copy CLIENT ID (this is for DISCORD_CLIENT_ID)
      • Select Bot then copy TOKEN (this is for DISCORD_TOKEN)
  • DISCORD_GUILD_ID: Follow this link to setup Developer Mode and to get your server's ID (aka DISCORD_GUILD_ID)
  • TWITCH_ACCESS_TOKEN and TWITCH_CLIENT_ID: Follow this link
  • TWITCH_BOT_USERNAME: This is your bot's twitch username (lower cased)

If you want the images to be accessed externally, use ngrok and replace BASE_URL value in src/index.js with the new url.

AI models setup

TODO

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

onlysudo's People

Contributors

ma7dev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

moodixd34

onlysudo's Issues

Docker

Docket image to install all of the AI models and run the bot.

Unit Tests

  • CI
    • Auto-formatter
    • Build on OS
      • Linux
      • Mac
      • Windows
    • Unit tests
      • Discord Commands
      • Twitch Commands
      • API
    • Code coverage
  • Unit tests for every Command and API request
  • Error handling
    • Commands (args, url not working, commands not completed)
    • Bad requests
    • Queuing of AI orders

Ideas

  • run all in one script
  • update BASE_URL based on ngrok's url workaround is to override the value within src/index.js

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.