Skip to content

Instantly share code, notes, and snippets.

@meowabyte
Last active September 26, 2024 16:07
Show Gist options
  • Save meowabyte/9d130099d6e3cbebc543411826517058 to your computer and use it in GitHub Desktop.
Save meowabyte/9d130099d6e3cbebc543411826517058 to your computer and use it in GitHub Desktop.
Vencord snippet that adds a super power of adding anyone to friends! (VISUAL ONLY)
findByProps("addRelationship").addRelationship = ({ userId, type = 1 }) => {
console.log(`+ ${userId} (${type})`)
findStore("RelationshipStore").getRelationships()[userId] = type
FluxDispatcher.dispatch({
type: "RELATIONSHIP_ADD",
relationship: {
id: userId,
type: type,
user: findByProps("getUser").getUser(userId),
nickname: null
}
})
}
findByProps("addRelationship").removeRelationship = (userId) => {
console.log(`- ${userId}`)
delete findStore("RelationshipStore").getRelationships()[userId]
FluxDispatcher.dispatch({
type: "RELATIONSHIP_REMOVE",
relationship: {
id: userId,
user: findByProps("getUser").getUser(userId)
}
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment