mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 13:06:50 +00:00
feat(core): add dispatch for autoproxy events (#621)
This commit is contained in:
parent
44bd0d6079
commit
caff9c50aa
5 changed files with 45 additions and 4 deletions
|
|
@ -44,4 +44,23 @@ public class AutoproxyPatch: PatchObject
|
|||
|
||||
return p;
|
||||
}
|
||||
|
||||
public JObject ToJson(ulong? guild_id, ulong? channel_id, string? memberId = null)
|
||||
{
|
||||
var o = new JObject();
|
||||
|
||||
o.Add("guild_id", guild_id?.ToString());
|
||||
o.Add("channel_id", channel_id?.ToString());
|
||||
|
||||
if (AutoproxyMode.IsPresent)
|
||||
o.Add("autoproxy_mode", AutoproxyMode.Value.ToString().ToLower());
|
||||
|
||||
if (AutoproxyMember.IsPresent)
|
||||
o.Add("autoproxy_member", memberId);
|
||||
|
||||
if (LastLatchTimestamp.IsPresent)
|
||||
o.Add("last_latch_timestamp", LastLatchTimestamp.Value.FormatExport());
|
||||
|
||||
return o;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue