Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

160 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Anime.com Discord Bot

A small Discord bot that fetches public Anime.com profile information for usernames such as https://www.anime.com/u/<username>.

What it does

The bot currently supports:

  • /stats for your linked Anime.com profile or another public profile
  • /rank for aura/followers leaderboard positions
  • /history for aura/follower snapshot history
  • /compare for side-by-side public profile comparison
  • /leaderboard for ranked linked/tracked users
  • /toplists for completed/watching/planning/dropped/avg-rating leaderboards
  • /topsocial for comments/reviews/lists leaderboards
  • /topgrowth for 7-day aura/follower growth leaderboards
  • /topreviews for top reviewers and avg-rating leaders
  • /milestones for users nearest to their next aura/follower milestones
  • /discoverusers for public username discovery from show pages and review feeds
  • /activityfeed to auto-post trending reviews, discussions, and linked-user posts
  • /activityfeed-status to inspect current feed settings
  • /activityfeed-disable to stop automatic feed posts
  • /activityfeed-run to trigger one manual feed pass
  • /topbadges for badge-count leaderboards
  • /serverstats for server bot-data summary
  • /liststats for compact list counts
  • /recent for recently updated entries
  • /badges for displayed or earned badges
  • /listinfo for public anime list status views
  • /profile-raw for the raw public JSON payload

The /stats slash command fetches public data from Anime.com's public GraphQL endpoint and shows:

  • display name
  • aura
  • joined date
  • followers and following
  • comments, lists, and reviews
  • earned and featured badges
  • profile bio and avatar

This project does not use an official Anime.com API. It uses Anime.com's public website GraphQL endpoint that the frontend appears to call for profile pages, so it can still break if Anime.com changes its schema, request rules, or blocks automated access.

Requirements

  • Node.js 18 or newer
  • a Discord application and bot token

Setup

  1. Install Node.js 18+.
  2. In this folder, run:
npm install
  1. Copy .env.example to .env and fill in:
DISCORD_TOKEN=your_bot_token_here
DISCORD_CLIENT_ID=your_application_client_id_here
DISCORD_GUILD_ID=optional_test_server_id_here
DISCORD_GUILD_IDS=optional_comma_separated_test_server_ids
DATA_DIR=optional_persistent_data_directory
ANIME_CACHE_TTL_MS=120000
ACTIVITY_FEED_INTERVAL_MS=7200000
  1. Register the slash command:
npm run register

If DISCORD_GUILD_ID is set, the command is registered to that server immediately for testing. If it is omitted, the command is registered globally and can take a bit longer to appear. If DISCORD_GUILD_IDS is set, commands are registered to each of those guilds.

  1. Start the bot:
npm start

Usage

In Discord:

/stats
/stats username: anfal
/rank username: anfal
/history username: anfal
/compare user_one: anfal user_two: shomik
/toplists metric: completed
/topsocial metric: comments
/topgrowth metric: aura7d
/topreviews metric: avgRating min_lists: 10
/milestones
/discoverusers show: naruto source: all
/activityfeed channel:#anime-feed reviews:true discussions:true episode_discussions:true memes:true polls:true news:true linked_users:true
/activityfeed-status
/activityfeed-run
/topbadges type: displayed
/serverstats
/liststats username: anfal
/recent username: anfal
/badges username: anfal type: displayed
/listinfo username: anfal status: COMPLETED
/profile-raw username: anfal

Notes

  • The bot currently uses Anime.com's public GraphQL endpoint at https://www.anime.com/api/graphql for profiles and review-backed username discovery.
  • Activity feeds are stored locally in DATA_DIR/activity-feeds.json and dedupe previously posted items per server.
  • The activity feed loop defaults to every 2 hours. You can override that with ACTIVITY_FEED_INTERVAL_MS.
  • Activity feed messages include the direct Anime.com post URL so Discord can unfurl the native link preview alongside the bot's summary embed.
  • Anime.com responses are cached briefly in memory. You can change the TTL with ANIME_CACHE_TTL_MS.
  • Profile history snapshots are stored locally in DATA_DIR/profile-history.json whenever the bot fetches a profile.
  • If Anime.com changes that query or starts blocking bot-like traffic, we may need to add retries, longer caching, or a browser-based fallback.
  • For Railway or other hosts, set DATA_DIR to a persistent mounted folder if you want tracked profiles and linked accounts to survive redeploys and restarts.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages