A small Discord bot that fetches public Anime.com profile information for usernames such as https://www.anime.com/u/<username>.
The bot currently supports:
/statsfor your linked Anime.com profile or another public profile/rankfor aura/followers leaderboard positions/historyfor aura/follower snapshot history/comparefor side-by-side public profile comparison/leaderboardfor ranked linked/tracked users/toplistsfor completed/watching/planning/dropped/avg-rating leaderboards/topsocialfor comments/reviews/lists leaderboards/topgrowthfor 7-day aura/follower growth leaderboards/topreviewsfor top reviewers and avg-rating leaders/milestonesfor users nearest to their next aura/follower milestones/discoverusersfor public username discovery from show pages and review feeds/activityfeedto auto-post trending reviews, discussions, and linked-user posts/activityfeed-statusto inspect current feed settings/activityfeed-disableto stop automatic feed posts/activityfeed-runto trigger one manual feed pass/topbadgesfor badge-count leaderboards/serverstatsfor server bot-data summary/liststatsfor compact list counts/recentfor recently updated entries/badgesfor displayed or earned badges/listinfofor public anime list status views/profile-rawfor 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.
- Node.js 18 or newer
- a Discord application and bot token
- Install Node.js 18+.
- In this folder, run:
npm install- Copy
.env.exampleto.envand 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- Register the slash command:
npm run registerIf 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.
- Start the bot:
npm startIn 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
- The bot currently uses Anime.com's public GraphQL endpoint at
https://www.anime.com/api/graphqlfor profiles and review-backed username discovery. - Activity feeds are stored locally in
DATA_DIR/activity-feeds.jsonand 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.jsonwhenever 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_DIRto a persistent mounted folder if you want tracked profiles and linked accounts to survive redeploys and restarts.