Skip to content

Instantly share code, notes, and snippets.

@rohzzn
Last active November 6, 2022 13:49
Show Gist options
  • Save rohzzn/1a5f2d3ff91fe22364fd17a834a4cb67 to your computer and use it in GitHub Desktop.
Save rohzzn/1a5f2d3ff91fe22364fd17a834a4cb67 to your computer and use it in GitHub Desktop.
import selfcore from "selfcore";
const client = new selfcore();
const gateway = new selfcore.Gateway(
"TOKEN"
);
gateway.on("message", (m) => {
if (m.channel_id === "CHANNEL_ID") {
let content = m.content ? m.content : { embeds: [m.embeds[0]] };
client.sendWebhook(
"WEBHOOK_URL",
content
);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment