Skip to content

Instantly share code, notes, and snippets.

@meowabyte
Created May 7, 2023 14:15
Show Gist options
  • Save meowabyte/d582131a5236e9795a48a7c80a054463 to your computer and use it in GitHub Desktop.
Save meowabyte/d582131a5236e9795a48a7c80a054463 to your computer and use it in GitHub Desktop.
Vencord funny messagelogger editor
/*
Script edits message with contents from msgs variable before removing it
this makes content be visible forever only for MessageLogger users (and for people who are fast enough to read it)
dont use too many messages as it might ratelimit you
*/
const msgs=[
`██░█░░█▀░███░█░░░█`,
`█░█░█░██░█░█░█░█░█ hi messagelogger users`,
`█░█░█░█▄░███░█████`
],originalRemove = findByProps('editMessage', 'deleteMessage').deleteMessage,currentUser = findByProps('getCurrentUser').getCurrentUser(),getMessage = findStore('MessageStore').getMessage;findByProps('editMessage','deleteMessage').deleteMessage=async(...args)=>{const[cID, mID]=args;if(getMessage(cID,mID).author.id!==currentUser.id)return originalRemove(...args);for(const mc of msgs){await fetch(`https://discord.com/api/v9/channels/${cID}/messages/${mID}`,{"headers":{"authorization":findByProps('getToken').getToken(),"content-type":"application/json"},"body": JSON.stringify({content:mc}),"method": "PATCH"});}return originalRemove(...args)}

Comments are disabled for this gist.