diff options
author | fawn <fawn@envs.net> | 2023-02-10 21:41:49 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-10 22:41:49 +0100 |
commit | d95be1acbaa282c53508a33d85cdda2ea76c50da (patch) | |
tree | 48145b1ff9c4455956d48c8b3c840323167fa96e /src/plugins/messageLogger | |
parent | 1d995e58f515dbeb908ba34bf70f829bfd3ccfac (diff) | |
download | Vencord-d95be1acbaa282c53508a33d85cdda2ea76c50da.tar.gz Vencord-d95be1acbaa282c53508a33d85cdda2ea76c50da.tar.bz2 Vencord-d95be1acbaa282c53508a33d85cdda2ea76c50da.zip |
refactor: update plugins to use `$self` (#478)
Co-authored-by: Ven <vendicated@riseup.net>
Diffstat (limited to 'src/plugins/messageLogger')
-rw-r--r-- | src/plugins/messageLogger/index.tsx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/messageLogger/index.tsx b/src/plugins/messageLogger/index.tsx index ff4c328..9242ce2 100644 --- a/src/plugins/messageLogger/index.tsx +++ b/src/plugins/messageLogger/index.tsx @@ -151,7 +151,7 @@ export default definePlugin({ replace: "MESSAGE_DELETE:function($1){" + " var cache = $2getOrCreate($1.channelId);" + - " cache = Vencord.Plugins.plugins.MessageLogger.handleDelete(cache, $1, false);" + + " cache = $self.handleDelete(cache, $1, false);" + " $2commit(cache);" + "}," }, @@ -161,7 +161,7 @@ export default definePlugin({ replace: "MESSAGE_DELETE_BULK:function($1){" + " var cache = $2getOrCreate($1.channelId);" + - " cache = Vencord.Plugins.plugins.MessageLogger.handleDelete(cache, $1, true);" + + " cache = $self.handleDelete(cache, $1, true);" + " $2commit(cache);" + "}," }, @@ -171,7 +171,7 @@ export default definePlugin({ replace: "$1" + ".update($3,m =>" + " $2.message.content !== m.editHistory?.[0]?.content && $2.message.content !== m.content ?" + - " m.set('editHistory',[...(m.editHistory || []), Vencord.Plugins.plugins.MessageLogger.makeEdit($2.message, m)]) :" + + " m.set('editHistory',[...(m.editHistory || []), $self.makeEdit($2.message, m)]) :" + " m" + ")" + ".update($3" @@ -287,7 +287,7 @@ export default definePlugin({ { // Render editHistory in the deepest div for message content match: /(\)\("div",\{id:.+?children:\[)/, - replace: "$1 (arguments[0].message.editHistory.length > 0 ? arguments[0].message.editHistory.map(edit => Vencord.Plugins.plugins.MessageLogger.renderEdit(edit)) : null), " + replace: "$1 (arguments[0].message.editHistory.length > 0 ? arguments[0].message.editHistory.map(edit => $self.renderEdit(edit)) : null), " } ] }, |