A Discord bot companion for anime enthusiasts, offering features like personalized recommendations, list management, and fun interactions.
- π Overview
- π¦ Features
- π Structure
- π» Installation
- ποΈ Usage
- π Hosting
- π License
- π Authors
The repository contains a project called "anime-discord-bot-companion" that is a Discord bot designed to provide a rich and interactive experience for anime fans. The bot leverages a powerful backend built with NestJS and a user-friendly frontend crafted with React to offer a wide range of features. It aims to foster a vibrant anime community within Discord by facilitating interactions, discussions, and shared experiences among anime enthusiasts.
Feature | Description | |
---|---|---|
π€ | Anime Recommendation System | Provides personalized anime recommendations based on user preferences, helping users discover new shows they might enjoy. |
π | Anime List Management | Allows users to create and manage their anime watchlists, tracking their progress, sharing lists with friends, and organizing their anime viewing experience. |
π | Fun Anime Interactions | Offers a variety of fun and engaging interactions related to anime, including trivia quizzes, meme generators, character generators, random fact generators, and interactive games. |
βοΈ | MMORPG-Like Anime Experience | Allows users to create anime-themed characters, level them up, collect virtual items, and interact with other players in a virtual world, adding a unique and engaging layer to the bot. |
π | Advanced Features | Incorporates AI-powered algorithms for more accurate and personalized recommendations, community features to foster interactions, gamified elements to incentivize user engagement, and visual enhancements for an engaging experience. |
βββ client
β βββ components
β β βββ Layout.js
β β βββ Header.js
β β βββ Footer.js
β β βββ AnimeList.js
β β βββ AnimeDetails.js
β β βββ MMORPG.js
β β βββ UserDashboard.js
β β βββ Login.js
β β βββ Register.js
β β βββ Profile.js
β βββ pages
β β βββ index.js
β β βββ anime.js
β β βββ list.js
β β βββ mmorpg.js
β β βββ user.js
β β βββ auth.js
β βββ styles
β β βββ globals.css
β β βββ theme.js
β βββ utils
β β βββ api.js
β β βββ auth.js
β βββ next.config.js
βββ src
β βββ api
β β βββ anime
β β β βββ aniList.service.ts
β β β βββ myAnimeList.service.ts
β β β βββ jikan.service.ts
β β β βββ anime.controller.ts
β β βββ user
β β β βββ user.service.ts
β β β βββ user.controller.ts
β β βββ auth
β β β βββ auth.service.ts
β β β βββ auth.controller.ts
β β βββ list
β β βββ list.service.ts
β β βββ list.controller.ts
β βββ discord
β β βββ events
β β β βββ ready.ts
β β β βββ messageCreate.ts
β β β βββ guildMemberAdd.ts
β β β βββ interactionCreate.ts
β β βββ commands
β β β βββ anime
β β β β βββ recommend.ts
β β β β βββ search.ts
β β β βββ list
β β β β βββ add.ts
β β β β βββ remove.ts
β β β β βββ show.ts
β β β β βββ update.ts
β β β βββ fun
β β β β βββ trivia.ts
β β β β βββ meme.ts
β β β β βββ character.ts
β β β β βββ random.ts
β β β βββ mmorpg
β β β β βββ create.ts
β β β β βββ levelup.ts
β β β β βββ quest.ts
β β β β βββ battle.ts
β β β β βββ inventory.ts
β β β β βββ shop.ts
β β β βββ help.ts
β β βββ utils
β β β βββ logger.ts
β β β βββ commandHandler.ts
β β β βββ errorHandler.ts
β β β βββ discord.service.ts
β β βββ bot.ts
β βββ modules
β β βββ database
β β β βββ database.module.ts
β β β βββ database.provider.ts
β β βββ anime
β β β βββ anime.module.ts
β β β βββ anime.service.ts
β β βββ user
β β β βββ user.module.ts
β β β βββ user.service.ts
β β βββ auth
β β β βββ auth.module.ts
β β β βββ auth.service.ts
β β βββ list
β β β βββ list.module.ts
β β β βββ list.service.ts
β β βββ mmorpg
β β β βββ mmorpg.module.ts
β β β βββ mmorpg.service.ts
β β βββ fun
β β βββ fun.module.ts
β β βββ fun.service.ts
β βββ entities
β β βββ user.entity.ts
β β βββ list.entity.ts
β β βββ anime.entity.ts
β β βββ mmorpg.entity.ts
β βββ interfaces
β β βββ anime.interface.ts
β β βββ user.interface.ts
β β βββ list.interface.ts
β β βββ mmorpg.interface.ts
β βββ constants
β β βββ env.constants.ts
β β βββ api.constants.ts
β βββ main.ts
βββ .env
βββ package.json
- Node.js
- npm
- Docker
- Redis
- PostgreSQL
- Clone the repository:
git clone https://github.com/spectra-ai-codegen/anime-discord-bot-companion.git
- Navigate to the project directory:
cd anime-discord-bot-companion
- Install dependencies:
npm install
- Create a
.env
file in the root directory and add the following environment variables:DISCORD_TOKEN
: Your Discord bot tokenPOSTGRES_HOST
: Your PostgreSQL database hostPOSTGRES_USER
: Your PostgreSQL database userPOSTGRES_PASSWORD
: Your PostgreSQL database passwordPOSTGRES_DATABASE
: Your PostgreSQL database nameREDIS_HOST
: Your Redis server hostREDIS_PORT
: Your Redis server portOPENAI_API_KEY
: Your OpenAI API key
- Create a
database.sql
file in the root directory and run the following SQL commands to create the necessary tables:CREATE TABLE users ( id SERIAL PRIMARY KEY, username VARCHAR(255) NOT NULL, email VARCHAR(255) NOT NULL UNIQUE, password VARCHAR(255) NOT NULL, created_at TIMESTAMP WITHOUT TIME ZONE DEFAULT CURRENT_TIMESTAMP ); CREATE TABLE lists ( id SERIAL PRIMARY KEY, user_id INT REFERENCES users(id), name VARCHAR(255) NOT NULL, type VARCHAR(255) NOT NULL, anime_ids TEXT[] NOT NULL, created_at TIMESTAMP WITHOUT TIME ZONE DEFAULT CURRENT_TIMESTAMP ); CREATE TABLE anime ( id SERIAL PRIMARY KEY, title VARCHAR(255) NOT NULL, synopsis TEXT, genres TEXT[], studios TEXT[], rating NUMERIC, created_at TIMESTAMP WITHOUT TIME ZONE DEFAULT CURRENT_TIMESTAMP ); CREATE TABLE mmorpg_characters ( id SERIAL PRIMARY KEY, user_id INT REFERENCES users(id), name VARCHAR(255) NOT NULL, level INT NOT NULL DEFAULT 1, experience INT NOT NULL DEFAULT 0, inventory TEXT[] NOT NULL, created_at TIMESTAMP WITHOUT TIME ZONE DEFAULT CURRENT_TIMESTAMP );
- Run the following commands to start the bot:
npm run start:dev
(for development mode)npm run start:prod
(for production mode)
- Start the development server:
npm run start:dev
- Open your browser and navigate to
http://localhost:3000
.
Adjust configuration settings in .env
.
- π Anime Recommendation:
/anime recommend
- To get personalized anime recommendations./anime recommend genre:Action,Comedy
- To get recommendations based on specific genres.
- π Anime List Management:
/list add <anime title>
- To add an anime to your watchlist./list remove <anime title>
- To remove an anime from your watchlist./list show
- To view your anime watchlist.
- π Fun Interactions:
/fun trivia
- To play a trivia game about anime./fun meme
- To generate an anime meme./fun character
- To generate a random anime character./fun random
- To get a random anime fact.
- π MMORPG:
/mmorpg create <character name>
- To create a new character./mmorpg levelup
- To level up your character./mmorpg quest
- To view and accept quests./mmorpg battle
- To battle other players or monsters./mmorpg inventory
- To view your inventory./mmorpg shop
- To buy and sell items.
- Install the Heroku CLI:
npm install -g heroku
- Login to Heroku:
heroku login
- Create a new Heroku app:
heroku create
- Deploy the code:
git push heroku main
- Configure the environment variables on Heroku:
DISCORD_TOKEN
POSTGRES_HOST
POSTGRES_USER
POSTGRES_PASSWORD
POSTGRES_DATABASE
REDIS_URL
OPENAI_API_KEY
- Add a Heroku addon for PostgreSQL and Redis:
heroku addons:create heroku-postgresql
heroku addons:create heroku-redis
- Configure the database connection details in your Heroku app settings.
- Run the following command to start the bot:
heroku ps:scale worker=1
This project is licensed under the GNU AGPLv3.
- Author Name - Spectra.codes
- Creator Name - DRIX10
Why only generate Code? When you can generate the whole Repository!