Description
Currently, Ryuuzaki Ryuusei allows users to showcase information about Anime, Manga, TV shows and movies manually. However, there is a missing feature related to the context menu when someone shares a supported site URL (such as MyAnimeList, AniList, Kitsu, Shikimori, Trakt, Anime-Planet, etc.). This feature request aims to address this issue by adding application context to showcase the title from the supported link.
Proposed Feature
The proposed feature involves enhancing the message context menu (right-clicking) functionality when a user shares a supported site URL. When the user invokes the command, Ryuuzaki Ryuusei bot will utilize regular expressions (Regex) to extract the ID from the URL (e.g., MAL ID: 1 for https://myanimelist.net/anime/1). Subsequently, the bot will submit the extracted ID to the appropriate location where the context is invoked (e.g., /anime
, /manga
, /shows
, /movies
).
Expected Benefits
By implementing this feature, users will be able to seamlessly retrieve and showcase the title of the anime, manga, TV show, or movie when sharing a supported site URL via the message context menu. This enhancement will streamline the user experience and provide convenient access to relevant information without the need for manual input.
Implementation Details
The implementation of this feature requires the following steps:
- Enhance the message context menu to capture supported site URLs.
- Utilize regular expressions (Regex) to extract the ID from the shared URL.
- Implement logic to determine the type of content (anime, manga, TV show, or movie) based on the supported site URL.
- Submit the extracted ID and content type to the appropriate location where the context is invoked (e.g.,
/anime
, /manga
, /shows
, /movies
).
- Retrieve the title information corresponding to the ID and display it in the showcase or relevant output.
It is essential to handle errors gracefully and provide appropriate feedback to users if the URL or ID extraction fails. Additionally, the implementation should be modular and adaptable to support additional supported sites in the future, ensuring the bot remains versatile and up-to-date.