Closed ambdroid closed 1 year ago
was playing with this too, message.applicationId
should contain the PK user ID (466378653216014359
), and matching this should prevent indiscriminately matching other webhook-created messages from non-PK sources as well (e.g. Discohook).
unless this behavior is desired to be inclusive of other proxy sources, e.g. Matrix bridge, Tupperbox.
looks good! sorry for the delay, somehow missed this PR at first. thanks for the contribution!
and yeah, checking against applicationId
would be nice as well - if nothing else, it'd prevent unnecessary PluralKit API spam. supporting other proxy sources isn't out of the question, but as it stands we're just wasting API calls.
Checking for the existence of a
webhook_id
is more precise and Discord is no doubt removing discriminators from the client API entirely soon.