Update EXAMPLE.env, install.sh, and 2 more files...

This commit is contained in:
Wizzard 2024-02-05 16:42:50 -05:00
commit 8d65a162c4
4 changed files with 37 additions and 0 deletions

3
EXAMPLE.env Normal file
View File

@ -0,0 +1,3 @@
SOURCE_CHANNEL_ID=111111111111111111
TARGET_CHANNEL_ID=111111111111111111
DISCORD_TOKEN=mASJIUFHKWHG.18295790udqawihKS

2
install.sh Executable file
View File

@ -0,0 +1,2 @@
npm install discord.js-selfbot-v13@latest
npm install dotenv

26
main.js Normal file
View File

@ -0,0 +1,26 @@
require('dotenv').config();
const { Client } = require('discord.js-selfbot-v13');
const client = new Client();
const SOURCE_CHANNEL_ID = process.env.SOURCE_CHANNEL_ID;
const TARGET_CHANNEL_ID = process.env.TARGET_CHANNEL_ID;
client.on('ready', () => {
console.log(`${client.user.tag} is ready!`);
});
client.on('messageCreate', async message => {
if (message.channel.id === SOURCE_CHANNEL_ID) {
if (message.author.id === client.user.id) return;
const targetChannel = await client.channels.fetch(TARGET_CHANNEL_ID);
if (!targetChannel) {
console.error('Target channel not found');
return;
}
targetChannel.send(`<@${message.author.id}> / **${message.author.tag}**: ${message.content}`);
}
});
client.login(process.env.DISCORD_TOKEN);

6
package.json Normal file
View File

@ -0,0 +1,6 @@
{
"dependencies": {
"discord.js-selfbot-v13": "^3.1.4",
"dotenv": "^16.4.1"
}
}