Coder Social home page Coder Social logo

lostb053 / anibot Goto Github PK

View Code? Open in Web Editor NEW
91.0 4.0 113.0 230 KB

Telegram anime bot that uses Anilist API

Home Page: https://t.me/hanabi_anibot

License: MIT License

Python 99.99% Procfile 0.01%
anilist telegram anilist-api animefillerlist livechartme subsplease telegram-bot anime crunchyroll rss-feed-parser

anibot's Introduction

Telegram Bot Repo Capable of fetching the following Info via Anilist API inspired from AniFluid and Nepgear

  • Anime
  • Airing
  • Manga
  • Character
  • Studio
  • Scheduled
  • Top animes
  • Favourites
  • Anilist Activity
  • Update Anilist entry using bot
  • Popular, trending and upcoming animes for a season
  • Random anime quotes
  • Anime fillers from animefillerslist
  • Anime Airing notifications from LiveChart
  • Anime Headlines from LiveChart
  • Anime Headlines from MyAnimeList
  • Anime release notifications for Crunchyroll
  • Anime release notifications for Subsplease
  • Anime Reverse Search Powered by tracemoepy
  • Watch Order from Chiaki using web api
  • Supports custom UI to be set for all results shown by /anime and /anilist in a group

Also can add to groups and enable sfw lock to prevent members from looking up hentai and 18+ rated stuff
Also includes command disabling
With new update you can now change UI for anime/anilist/manga results in your group

CodeFactor

Requirements

Available Cmds

 /help - Get interactive and detailed help on bot cmds
 /ping - Ping the bot to check if it's online
 /start - To start bot in group (will be logged) or pm (user if not OWNER will be logged)
 /anime - Fetches info on single anime (includes buttons to look up for prequels and sequels)
 /anilist - Fetches info on multiple possible animes related to query
 /character - Fetches info on multiple possible characters related to query
 /manga - Fetches info on multiple possible mangas related to query
 /airing - Fetches info on airing data for anime
 /studio - Fetches info on multiple possible studios related to query
 /flex - Fetches anilist info of an authorised user
 /user - Fetches anilist info as per query
 /schedule - Fetches scheduled animes
 /auth - Fetches info on how to authorize anilist account
 /browse - get popular, trending or upcoming animes
 /quote - get random quotes
 /logout - removes authorization
 /settings - To toggle nsfw lock and airing notifications and other settings in groups
 /top - to retrieve top animes for a genre or tag
 /reverse - Reverse search powered by tracemoepy
 /watch - Fetches watch order for anime series
 /feedback - contact bot owner or main support grp at @hanabi_support
 /me or /activity - Get Anilist recent activity
 /fillers - To get list of anime fillers
 /disable - To disable a command in group
 /enable - To enable a command in group
 /disabled - To list disabled commands in a group
 /favourites - Get Anilist favourites
 /gettags - Get list of available Tags
 /getgenres - Get list of available Genres
 /connect - Helps connect Public channel, to use bot as Channel in group

Owner/Sudo Cmds

 /eval - Runs python code (code must start right after cmd like "/eval print('UwU')")
 /term - Runs the code in terminal
 /stats - Gibs data on bot such as no. of grps/users and ping
 /dbcleanup - Cleans useless entries in database

How to host

Credits

For improvements PR or contact @LostB053 or @hanabi_support
Can ask for support too but don't expect much (since i myself am learning yet)

Note: I dropped SauceNAO stuff cuz i couldnt represent it in some good looking manner
I would be grateful if anybody can help me parse results and organize them like @reverseSearchBot

Something nearby but good looking would suffice too

anibot's People

Contributors

everythingsuckz avatar f36 avatar itspranavajay avatar lostb053 avatar niceslimenotbad avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

anibot's Issues

DeprecationWarning

Found this error on Heroku

/app/anibot/__main__.py:21: DeprecationWarning: There is no current event loop asyncio.get_event_loop().run_until_complete(main())

Livechart.me plugin is not working

Bug Description
Error on livechart.me plugins
Not send any rss feeds.

Error Logs
retval = await job.func(*job.args, **job.kwargs)

File "/app/anibot/plugins/livechartme.py", line 141, in livechart_parser

if (await D.find_one())['guid'] == str(i.find('guid')): KeyError: 'guid'

Thanks you for @lostb053 for making this awesome bot๐Ÿ™.

bot picture support

is there any way to get a bot picture at the starting of the bot like when we send '/start'

Bug on Airing

Bug on Airing
Bug happen on Airing cmd when adding aired anime to list, wont back again.

Heroku logs
Traceback (most recent call last):
File "/app/.heroku/python/lib/python3.10/site-packages/pyrogram/dispatcher.py", line 222, in handler_worker
await handler.callback(self.client, *args)
File "/app/anibot/utils/helper.py", line 104, in wrapper
await func(_, c_q, cq)
File "/app/anibot/plugins/anilist.py", line 845, in update_anilist_btn
else (await get_airing({"id": idm}, auth=True, user=user))
TypeError: get_airing() missing 1 required positional argument: 'ind'

Fix 43 Maintainability issues in multiple files

CodeFactor found multiple issues last seen at 50ad687:

Comparison 'in_list != None' should be 'in_list is not None'

Comparison 'auth == True' should be 'auth is True' if checking for the singleton value True, or 'auth' if testing for truthiness

Comparison 'english == None' should be 'english is None'

Comparison 'isfav == True' should be 'isfav is True' if checking for the singleton value True, or 'isfav' if testing for truthiness

Comparison 'episodes != None' should be 'episodes is not None'

Comparison 'air_on == None' should be 'air_on is None'

Comparison 'duration != None' should be 'duration is not None'

Comparison 'text != None' should be 'text is not None'

Comparison 'result[0] == False' should be 'result[0] is False' if checking for the singleton value False, or 'not result[0]' if testing for falsiness

Comparison 'req != None' should be 'req is not None'

Comparison 'spoiler == False' should be 'spoiler is False' if checking for the singleton value False, or 'not spoiler' if testing for falsiness

Comparison 'find_gc != None' should be 'find_gc is not None'

Comparison 'find_gc == None' should be 'find_gc is None'

Comparison 'enable == False' should be 'enable is False' if checking for the singleton value False, or 'not enable' if testing for falsiness

Comparison 'await A.find_one() == None' should be 'await A.find_one() is None'

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.