-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
37 lines (29 loc) · 936 Bytes
/
Copy pathindex.js
File metadata and controls
37 lines (29 loc) · 936 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
const { Client } = require('discord.js-selfbot-v13');
const { joinVoiceChannel } = require('@discordjs/voice');
const TOKEN = '_*_';
const GUILD_ID = '_*_';
const CHANNEL_ID = '_*_';
const client = new Client();
client.on('ready', async () => {
console.log(`${client.user.username} is ready!`);
client.user.setActivity('_*_', {
type: 'STREAMING',
url: 'https://twitch.tv/discord'
});
console.log('تم تعيين الحالة إلى STREAMING.');
setInterval(async () => {
try {
const channel = await client.channels.fetch(CHANNEL_ID);
joinVoiceChannel({
channelId: channel.id,
guildId: GUILD_ID,
selfMute: true,
selfDeaf: true,
adapterCreator: channel.guild.voiceAdapterCreator
});
} catch (error) {
console.error("❌ خطأ في الانضمام للروم الصوتي:", error.message);
}
}, 1000);
});
client.login(TOKEN);