DinkPlugin icon indicating copy to clipboard operation
DinkPlugin copied to clipboard

Feature: Session/World notifier (login / logout / world-hop) to Discord

Open dellmas opened this issue 4 months ago • 2 comments

Checklist

  • [x] I've searched the issues and pull requests for similar looking suggestions.
  • [x] I've checked the Unreleased section of the changelog for newly added features that sound like my suggestion.

Describe your Suggestion

Add a new notifier for session events with three toggles and templates:

  • [ ] Notify on login
    • Default: %USERNAME% logged in on W%WORLD%
  • [ ] Notify on logout
    • Default: %USERNAME% logged out from W%WORLD%
  • [ ] Notify on world hop
    • Default: %USERNAME% hopped W%WORLD_FROM% → W%WORLD_TO% (%WORLD_TYPE_TO%)

Config / behavior:

  • Screenshot: OFF by default (to avoid spam); still allow ON like other notifiers.
  • Debounce multiple hops within N seconds (e.g., 2–3s).
  • “Ignore on startup” window (e.g., first 5–10s after login) to prevent duplicate login+hop posts.
  • Support per-notifier webhook override, same as other notifiers.

Implementation notes (RuneLite):

  • Use GameStateChanged to detect LOGGED_IN and transitions to login screen for login/logout.
  • Use WorldChanged for hops; include from→to world numbers and WorldType (e.g., PVP, Skill Total).
  • Tokens available to templates:
    • %USERNAME%, %WORLD%, %WORLD_FROM%, %WORLD_TO%, %WORLD_TYPE_FROM%, %WORLD_TYPE_TO%.

Acceptance criteria:

  • Exactly one message on login, one on logout (optional skip on DC), and one on each hop.
  • Messages respect cooldown, startup-ignore, screenshot, and webhook override settings.

Reasoning

  • Communities use Dink to centralize Discord activity (death/level/loot). Session events round out that picture.
  • Useful for group coordination and light moderation (e.g., know when a player arrives or moves worlds).
  • Technically low-risk: RuneLite already exposes GameStateChanged and WorldChanged events; this is mostly wiring + config.
  • Spam is controlled via debounce and screenshot OFF by default.
  • Fits Dink’s existing “notifier + templating + webhook override” model, no new infra required.

dellmas avatar Aug 23 '25 11:08 dellmas

Could you provide some real world examples of what this would be used for?

pajlada avatar Aug 23 '25 12:08 pajlada

Real-world examples

Group coordination: When someone logs in or hops, a short Discord line (“dellmas hopped W349 → W512 (PVP)”) tells the group where to meet without asking “what world?”

Raid/boss nights: Teams staging for ToA/CoX/ToB use the hop message to keep everyone on the same world as they swap to emptier shards.

PK/scouting (private channel): Scouts hopping PVP worlds auto-announce so the team can converge quickly.

Outage clarity: During DC storms or world crashes, the feed shows mass logouts and where people regrouped.

This fits Dink’s purpose (Discord notifications for in-game activity) and reuses the same model as other notifiers (templates, per-notifier webhook, cooldowns, screenshots OFF by default). Technically it’s just wiring GameStateChanged (login/logout) and WorldChanged (hops) with a small debounce/“ignore on startup” to avoid spam.

dellmas avatar Aug 23 '25 13:08 dellmas