项目作者: aaryadevg

项目描述 :
A simple discord bot for recommending anime
高级语言: Python
项目地址: git://github.com/aaryadevg/Recommender-Bot.git
创建时间: 2020-08-12T13:53:08Z
项目社区:https://github.com/aaryadevg/Recommender-Bot

开源协议:MIT License

下载


Logo Image

Recommender-Bot

A simple discord bot for recommending anime

uses a simple content based recommender system

This bot is as a learning project, to learn about:

  • recommender systems
  • async methods
  • SQL

Dataset and Inspiration for the project:

Requirements

This discord bot is made in python and requires python 3.6+
you can install python Here

along with python the discord bot uses a few other additional packages

Using the bot

First clone or download the source from GitHub

To use the Recommender-Bot you need to sign in to Discord Devloper Portal
and create a bot application

add the created bot to a server using
https://discordapp.com/oauth2/authorize?client_id={YOUR CLIENT ID}&scope=bot&permissions=0

after this you should recieve a token for your bot add this token to your environment variable:

MacOS

  • Navigate to your Home directory
    1. cd
  • You may save a copy of the .bash_profile before editing
    1. mv ~/.bash_profile ~/.bash_profile.backup
  • Open the .bash_profile file
    1. nano .bash_profile
  • Export a variable called ‘DISCORD_TOKEN’
    1. export DISCORD_TOKEN={Your Discord token}
  • Save the .bash_profile and restart your terminal

If you require any further assistance with this please check out @himanshuagarwal1395/setting-up-environment-variables-in-macos-sierra-f5978369b255">This article

Windows 10

  • Type “env” in the search
  • Click on “Edit system environment variables”
  • Click on “environment variables”
  • Click on “New”
  • Add “DISCORD_TOKEN” under the “Variable” column
  • Add Your Discord token under the “Value” column
  • Click on “Ok” to save changes

If you require any further assistance with this please check out This article

Unfortunetly I do not have much experience with a Linux based systems 🙁

Now its finally time to run the bot
Open up terminal or command prompt (on windows)
navigate to the directory where you saved the source for the bot
run the “Bot.py script” using
Python3 Bot.py On MacOS
python Bot.py On Windows
After everything is ready you should see a “ready” message printed to the terminal or command prompt

Commands

Command description Parameters
>recommend [genre] Recommends a random anime of the given genre genre : string
>genres Sends a List of all available genres in the Database None.
>search [anime] Searches for the given anime anime : string
>similar [anime] Shows the 5 most similar anime to the given anime anime : string
>random Gets a random anime from the Database None.

Contribution

Feel free to contribute to this project any contribution is very welcome and contributions are highly appreciated

Todo:

  • Add more commands
  • Make commands case in-sensitive
  • Try using neural colaborative filltering for recommendation
  • Build a scrapper to get info for latest anime
  • Add a logo to the README