diff --git a/index.ts b/index.ts index ea3e9a2..3172c4d 100644 --- a/index.ts +++ b/index.ts @@ -176,10 +176,9 @@ const server = new Server( if (userWindow.contactFormSelectedField === "message") { userWindow.contactFormData.message += newLine; } else if (userWindow.contactFormSelectedField === "submit") { - const webhookUrl = - "https://discord.com/api/webhooks/1349123668914999361/2rvvgNNRyzgGpKFJ0JLnT-PbkbM-phyQZwTxRBkxDWSA_9SybsP2eILbxsegthsWsu8d"; + const webhookUrl = process.env.DISCORD_WEBHOOK_URL!; const messageData = { - content: `<@323206956640763916>\nName: ${ + content: `<@${process.env.DISCORD_USER_ID}>\nName: ${ userWindow.contactFormData.name }\nEmail: ${ userWindow.contactFormData.email @@ -273,6 +272,6 @@ const server = new Server( } ); -server.listen(2222, "0.0.0.0", () => { - console.log("🚀 SSH server running on port 2222"); +server.listen(+process.env.PORT!, "0.0.0.0", () => { + console.log(`🚀 SSH server running on port ${process.env.PORT!}`); }); diff --git a/template.env b/template.env new file mode 100644 index 0000000..31300ff --- /dev/null +++ b/template.env @@ -0,0 +1,3 @@ +DISCORD_WEBHOOK_URL= +DISCORD_USER_ID= +PORT=2222 \ No newline at end of file