🧩
Seanime Extensions
🧩
Seanime Extensions
  • Seanime
    • Getting started
    • Core APIs
    • Changelog
  • Content Providers
    • Write, test, share
    • Anime torrent provider
    • Manga provider
    • Online streaming provider
  • Plugins
    • Introduction
    • Write, test, share
    • APIs
      • Helpers
      • Store
      • Storage
      • Database
      • AniList
      • System
        • Permissions
        • OS
        • Filepath
        • Commands
        • Buffers, I/O
        • MIME
    • UI
      • Basics
      • User Interface
        • Tray
        • Toast
        • Screen
        • Command Palette
        • Action
        • DOM
      • Anime/Library
        • Anime
        • Playback
        • Continuity
        • Auto Downloader
        • Auto Scanner
        • Filler Manager
        • External Player Link
      • Downloading
        • Downloader
        • Torrent Client
      • Other
        • Manga
        • Discord
        • MPV
    • Hooks
    • Example
  • Frequently asked
    • Feature requests
Powered by GitBook
On this page
  • Permissions
  • ctx.discord
  • Core Methods
  • setAnimeActivity
  • updateAnimeActivity
  • setMangaActivity
  • cancel
  1. Plugins
  2. UI
  3. Other

Discord

Permissions

discord permission is required

{
  //...
  "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.

PreviousMangaNextMPV

Last updated 20 days ago