Twan07 commited on
Commit
ebbde3a
·
verified ·
1 Parent(s): 7189623

Update index.ts

Browse files
Files changed (1) hide show
  1. index.ts +2 -2
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 '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)
@@ -25,7 +25,7 @@ const queues = new Map<string, MusicQueue>(); // Quản lý hàng đợi nhạc
25
 
26
  config.tokens.forEach((token: string, index: number) => {
27
  const proxy = 'socks5://admin1:thanhtai123@74.81.54.129:80'; // Thay bằng thông tin proxy của bạn
28
- const agent = new HttpsProxyAgent(proxy);
29
 
30
  const client = new Client({
31
  intents: [
 
4
  import { join } from 'path';
5
  import type { Command } from './types';
6
  import { MusicQueue } from './utils/MusicQueue';
7
+ import { SocksProxyAgent } from 'socks-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)
 
25
 
26
  config.tokens.forEach((token: string, index: number) => {
27
  const proxy = 'socks5://admin1:thanhtai123@74.81.54.129:80'; // Thay bằng thông tin proxy của bạn
28
+ const agent = new SocksProxyAgent(proxy);
29
 
30
  const client = new Client({
31
  intents: [