Discord

Permissions

{
  //...
  "plugin": {
    "permissions": {
      "scopes": ["discord"]
    }
  }
}

ctx.discord

The ctx.discord API allows your plugin to integrate with Discord Rich Presence, displaying what users are watching or reading in their Discord status.

Core Methods

setAnimeActivity

Sets Discord Rich Presence to show anime activity.

Parameters:

  • opts: Object containing:

    • id: Number - AniList media ID

    • title: String - Anime title to display

    • image: String - Image URL for the anime

    • isMovie: Boolean - Whether the anime is a movie

    • episodeNumber: Number - Current episode number

    • progress : Number - Progress in seconds

    • duration : Number - Duration in seconds

    • totalEpisodes? : Number - Number of episodes of the anime

    • currentEpisodeCount? : Number - Number of playable episodes

    • episodeTitle? : String - Episode title

updateAnimeActivity

Update the current anime activity progress set by setAnimeActivity .

This is safe to call every second, Seanime will take care of batching updates

Parameters:

  • progress : Number - Progress in seconds

  • duration : Number - Duration in seconds

  • paused : Boolean

setMangaActivity

Sets Discord Rich Presence to show manga reading activity.

Parameters:

  • opts: Object containing:

    • id: Number - AniList media ID

    • title: String - Manga title to display

    • image: String - Image URL for the manga

    • chapter: String - Current chapter number or range

cancel

The cancel() function terminates any ongoing Discord Rich Presence activity.

Last updated