APRK01 commited on
Commit Β·
65bf94f
1
Parent(s): 9ba9cec
Fix: Force Google DNS to bypass HF resolution issues
Browse files- src/index.js +9 -0
src/index.js
CHANGED
|
@@ -1,5 +1,14 @@
|
|
| 1 |
require('dotenv').config();
|
| 2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
const {
|
| 4 |
Client,
|
| 5 |
GatewayIntentBits,
|
|
|
|
| 1 |
require('dotenv').config();
|
| 2 |
|
| 3 |
+
// Fix for Hugging Face DNS resolution
|
| 4 |
+
const dns = require('node:dns');
|
| 5 |
+
try {
|
| 6 |
+
dns.setServers(['8.8.8.8', '8.8.4.4', '1.1.1.1']);
|
| 7 |
+
console.log(' π‘ DNS: Using Google/Cloudflare resolvers (8.8.8.8)');
|
| 8 |
+
} catch (e) {
|
| 9 |
+
console.log(' β οΈ DNS: Could not set custom resolvers, using system default.');
|
| 10 |
+
}
|
| 11 |
+
|
| 12 |
const {
|
| 13 |
Client,
|
| 14 |
GatewayIntentBits,
|