Code Monkey home page Code Monkey logo

nino's Introduction

nino | v0.3.0
Random Anime Image App for Discord

Discord bot that provides an easy way to get anime images and gifs randomly! This project stemmed from me testing how quickly I can get a new Discord app up and running using my bot template. It was so fast (roughly just under a week) in fact that I added way more features out of scope of me initially only wanting to get waifus.

That being said, I had quite a bit of fun with this even if it just was a test run. There were a bunch of really cool anime projects out there when I was trying to look for APIs to retrieve the images. I couldn't settle for just one so I ended up using these 3 super cool and awesome APIs!

  • OtakuGifs - High quality gifs in a huge collection to choose from. Pretty straighforward endpoints too
  • NekosAPI - Diverse categories with so much metadata of images. Most advanced of the endpoints I've seen out of the 3, I see its v2 is trying to move to json-api specs so that's pretty neat.
  • Waifu.im - Possibly the best waifu resource out there, just top tier waifu images all round and an easy-to-use interface. Great sus collections too if you're into that ๐Ÿคท

Command List

Nino uses Discord's Slash Commands /:

  • image - shows a random anime image
  • gif - shows a random anime gif
  • waifu - shows a random waifu image
  • about - information hub of Nino
  • help - list of commands
  • about - generates Nino's invite link

Prerequisites

You would need the following before getting started:

  • Have a Discord Application created from the Discord Dev Portal
  • Node with a version of at least v16.13.0
  • Yarn

Installation

  1. Clone this repository and then change directory into it
  2. Install dependencies
    • yarn install
  3. Add required environment variables
    • This project needs the following core environment variables to properly work
      • ENV
      • BOT_TOKEN
      • BOT_ID
      • GUILD_IDS
    • Create a environment.ts file under src/config
      • mkdir src/config && touch src/config/environment.ts
    • Export the relevant variables above
      •  export const ENV = 'dev';
         export const BOT_TOKEN = 'Your Discord Bot Token';
         export const BOT_ID = 'Your Discord Bot ID';
         export const GUILD_IDS = 'The Discord Server ID you want the bot to register Slash Commands in'
        
  4. Add database configuration
    • This project uses a PostGreSQL database to store Discord Guild information.
    • If you don't particularly care about any of that, delete src/database.ts and any instances of USE_DATABASES
    • Else, create a database.ts file under src/config and export a databaseConfig variable
      • //Fill these up with your db credentials
         export const databaseConfig = {
            database: '',
            host: '',
            user: '',
            port: 1234,
            password: '',
            ssl: {
              rejectUnauthorized: false,
            },
         };
        
  5. Start the App
    • yarn start

TODO: Add better instructions and usage examples after finishing up the readme of djs-typescript-template

nino's People

Contributors

dependabot[bot] avatar vexuas avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

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.