Update index.ts
Browse files
index.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { readdirSync } from 'fs';
|
|
| 4 |
import { join } from 'path';
|
| 5 |
import type { Command } from './types';
|
| 6 |
import { MusicQueue } from './utils/MusicQueue';
|
| 7 |
-
import { HttpsProxyAgent } from '
|
| 8 |
|
| 9 |
const commandsDir = join(import.meta.dir, 'Commands'); // Bun sử dụng import.meta.dir thay vì __dirname
|
| 10 |
const commands: Command[] = readdirSync(commandsDir)
|
|
@@ -24,7 +24,7 @@ const clients: Client[] = [];
|
|
| 24 |
const queues = new Map<string, MusicQueue>(); // Quản lý hàng đợi nhạc theo guildId
|
| 25 |
|
| 26 |
config.tokens.forEach((token: string, index: number) => {
|
| 27 |
-
const proxy = 'http://
|
| 28 |
const agent = new HttpsProxyAgent(proxy);
|
| 29 |
|
| 30 |
const client = new Client({
|
|
|
|
| 4 |
import { join } from 'path';
|
| 5 |
import type { Command } from './types';
|
| 6 |
import { MusicQueue } from './utils/MusicQueue';
|
| 7 |
+
import { HttpsProxyAgent } from 'https-proxy-agent'; // Cài đặt gói này: bun add https-proxy-agent
|
| 8 |
|
| 9 |
const commandsDir = join(import.meta.dir, 'Commands'); // Bun sử dụng import.meta.dir thay vì __dirname
|
| 10 |
const commands: Command[] = readdirSync(commandsDir)
|
|
|
|
| 24 |
const queues = new Map<string, MusicQueue>(); // Quản lý hàng đợi nhạc theo guildId
|
| 25 |
|
| 26 |
config.tokens.forEach((token: string, index: number) => {
|
| 27 |
+
const proxy = 'http://103.82.36.237:8888'; // Thay bằng thông tin proxy của bạn
|
| 28 |
const agent = new HttpsProxyAgent(proxy);
|
| 29 |
|
| 30 |
const client = new Client({
|