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 {
|
| 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
|
| 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: [
|