Utilisation d'un .env pour le webhook (ça sert à rien d'aller chercher l'ancien dans le git le webhook est supprimé)
This commit is contained in:
parent
efb2184245
commit
fa66d7ed2b
2 changed files with 7 additions and 5 deletions
9
index.ts
9
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!}`);
|
||||
});
|
||||
|
|
|
|||
3
template.env
Normal file
3
template.env
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
DISCORD_WEBHOOK_URL=<your-webhook-url>
|
||||
DISCORD_USER_ID=<your-user-id>
|
||||
PORT=2222
|
||||
Loading…
Add table
Reference in a new issue