Skip to content

Plugin Interfacing

DeflatedPickle edited this page Jun 30, 2020 · 1 revision

There are certain plugins included with Rawky that offer an API for you to use from a custom plugin. These are usually made as easy to use as possible.

To depend on and make use of these plugins, please include their ID in your dependencies.

Discord RPC

ID: discord_rpc

This plugin enables the use of Discord Rich Presence. It also offers a way for other plugins to use add content to the RPC connection.

After depending on it, you can make use of DiscordRP.stack to push a DiscordRichPresence instance. Both pushing and popping from this stack will change the RPC connection to the new head.

For a component plugin, you typically want to listen to EventPanelFocusGained, check the type of it and push the instance of DiscordRichPresence. This will mean focusing on this panel's docking item will change the Discord RPC to the pushed instance.

Tip of the Day

ID: tip_of_the_day

This plugin adds a start-up dialog that displays tips. This dialog is only shown when tips are registered.

To add a new tip, you will have to listen to EventAddTip and then add an instance of TipOfTheDayModel.Tip to it.