Last active
November 6, 2022 13:49
-
-
Save rohzzn/1a5f2d3ff91fe22364fd17a834a4cb67 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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