env for tg
This commit is contained in:
parent
9d3f51aa05
commit
32c5fcf2ac
5
.gitignore
vendored
5
.gitignore
vendored
@ -1 +1,6 @@
|
||||
node_modules
|
||||
.env
|
||||
.env.local
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
@ -136,10 +136,13 @@ export default function ContactBlock() {
|
||||
|
||||
function sendMessage(text)
|
||||
{
|
||||
const url = `https://api.telegram.org/bot8190149729:AAH1n6QXzaU__EwRhrPbEn9fqrFbPRRLFaI/sendMessage` // The url to request
|
||||
const botToken = process.env.REACT_APP_TELEGRAM_BOT_TOKEN;
|
||||
const chatId = process.env.REACT_APP_TELEGRAM_CHAT_ID;
|
||||
|
||||
const url = `https://api.telegram.org/bot${botToken}/sendMessage`;
|
||||
|
||||
const obj = {
|
||||
chat_id: 1017685666, // Telegram chat id
|
||||
chat_id: chatId, // Telegram chat id
|
||||
text: text // The text to send
|
||||
};
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user