This gist allows you to send fake Discord message everywhere you want!
The snippet works both on unmodified Discord and Vencord
Important
This code by default tries to grab all functions it needs from already implemented ones by Vencord (specifically ConsoleShortcuts plugin) and if it can't find them for some reason it THEN tries to implement it by itself, so if something's broken on vanilla - use snippet with Vencord!
Usage is fairly simple. Below code returns function fakeMessage
as variable but also it saves the same implementation to window.fakeMessage
so you don't have to execute it multiple times. (code prevents you to do so anyways for performance reasons)
Here's an example of using this function:
// Channel ID
const CHANNEL_ID = "<id>"
// Message author ID
const AUTHOR_ID = "<id>"
// It doesn't have to be string, it can be Message object
// More on https://discord.com/developers/docs/resources/message#messages-resource
const CONTENT = "Hello"
fakeMessage(CHANNEL_ID, AUTHOR_ID, CONTENT)
...edit those variables accordingly while using this example.
Caution
Snippet has been provided by me as-is and might stop working in any moment by any reason (Discord structure change, Vencord update, plugin update etc.), I'll try to update it at my own free time. I am also not responsible for any malicious use of this.