randydev commited on
Commit
2ec3b15
·
verified ·
1 Parent(s): c8bb5e9

Update lib/all.js

Browse files
Files changed (1) hide show
  1. lib/all.js +7 -9
lib/all.js CHANGED
@@ -42,21 +42,19 @@ async function InstagramDLV2(url) {
42
  }
43
  }
44
 
 
45
  async function TelegramUseLog(user_id, api_key, text_log) {
46
  const options = {
47
- method: 'GET',
48
- url: 'https://randydev-meta-ai.hf.space/user/tg/send_message',
49
- params: {
50
- user_id: user_id,
51
- api_key: api_key,
52
- text_log: text_log
53
- }
54
  };
 
55
  try {
56
  const response = await axios.request(options);
57
- return true;
58
  } catch (error) {
59
- console.error(error);
60
  return null;
61
  }
62
  }
 
42
  }
43
  }
44
 
45
+
46
  async function TelegramUseLog(user_id, api_key, text_log) {
47
  const options = {
48
+ method: "GET",
49
+ url: "https://randydev-meta-ai.hf.space/user/tg/send_message",
50
+ params: { user_id, api_key, text_log }
 
 
 
 
51
  };
52
+
53
  try {
54
  const response = await axios.request(options);
55
+ return response.status === 200;
56
  } catch (error) {
57
+ console.error("Telegram log failed:", error.message);
58
  return null;
59
  }
60
  }