Allows plugins to register callbacks when a message is created in a specified channel. This supports guild channels, guild categories, and direct messages. When a plugin that has registered subscriptions is unloaded then the subscriptions will be removed.
To be able to register channels for subscriptions you need to add the following line to your plugin.
private readonly DiscordSubscriptions _subscriptions = Interface.Oxide.GetLibrary<DiscordSubscriptions>();
To register a subscription you can use the following example below
_subscriptions.AddChannelSubscription(this, snowflakeChannelId, CallbackMethod);
To unregister a subscription you can use the following example below
_subscriptions.RemoveChannelSubscription(this, snowflakeChannelId, CallbackMethod);
The callback for a subscription will be the DiscordMessage object.
void CallbackMethod(DiscordMessage message)