randydev commited on
Commit
9ee814f
·
verified ·
1 Parent(s): 82e4c0f

Update lib/all.js

Browse files
Files changed (1) hide show
  1. lib/all.js +20 -0
lib/all.js CHANGED
@@ -58,6 +58,25 @@ async function InstagramDLV2(url) {
58
  }
59
  }
60
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
61
 
62
  async function TelegramUseLog(user_id, api_key, text_log) {
63
  const UserID = Number(user_id);
@@ -186,6 +205,7 @@ export {
186
  XsearchDownloaderV2,
187
  XInfoDownloaderV2,
188
  TelegramUseLog,
 
189
  audioContent,
190
  generateRandomTimestamp,
191
  SendWaifuRandom,
 
58
  }
59
  }
60
 
61
+ async function TelegramUseLogNotif(user_id, api_key) {
62
+ const UserID = Number(user_id);
63
+ const options = {
64
+ method: "GET",
65
+ url: "https://randydev-meta-ai.hf.space/user/tg/notifications",
66
+ params: {
67
+ user_id: UserID,
68
+ api_key: api_key
69
+ }
70
+ };
71
+
72
+ try {
73
+ const response = await axios.request(options);
74
+ return response.status === 200;
75
+ } catch (error) {
76
+ console.error("Telegram log failed:", error.message);
77
+ return null;
78
+ }
79
+ }
80
 
81
  async function TelegramUseLog(user_id, api_key, text_log) {
82
  const UserID = Number(user_id);
 
205
  XsearchDownloaderV2,
206
  XInfoDownloaderV2,
207
  TelegramUseLog,
208
+ TelegramUseLogNotif,
209
  audioContent,
210
  generateRandomTimestamp,
211
  SendWaifuRandom,