I do not take any responsibility for what happens to your Discord account when you use a selfbot. Don't be stupid and annoy people with it, it'll get you reported and banned. Selfbots are NOT ALLOWED on Discord, USE COMMON SENSE.
To start off, you're going to need the following tools and resources:
When you're in Visual Studio, click on "File" at the top left and click on "Open Folder..." - go to some location where you'd like to have your project, and create a new folder through the file prompt. (You can also do this beforehand, but I am a messy head so I like to do it this way.) Then all you have to do is click the new folder and then click "Choose".
Once you're done with that, you will have a workspace to put your work in. Right-click the folder inside Visual Studio Code on the left side and make a new javascript file. You can call it anything, but for simplicity, let's call it "index.js". After you're done with that, you can now install the NPM packages needed to create your bot. Look at the top of Visual Studio Code and you should see "Terminal". Click it and then click "New Terminal".
This will open a CMD window inside your Visual Studio Code, so you can easily make changes to any packages or install new ones all in the same place. It will automatically make an instance inside your working folder. Once you've done that, write the following:
npm install discord.js discord.js-commando
After that has ran its course, we can start working on the index file I was talking about. Here's what it should look like to begin with:
const { CommandoClient } = require('discord.js-commando'); // We initialize the Commando Client (it has the basic Discord client included in the package)
const path = require('path'); // This is so your bot can find your commands.
const client = new CommandoClient({
selfbot: true, // Do not change this, this is where the magic lies
commandPrefix: '?', // You can change the prefix to anything you want.
owner: '', // Change this to your user ID
invite: '' // You can leave this empty or delete it.
});
client.registry
.registerDefaultTypes() // Don't touch this.
.registerGroups([
['fun', 'Fun Commands'], // Basic command group, change it if you want
['util', 'Utility Commands'], // Same here.
['info', 'Information Commands'] // Same here.
])
.registerDefaultGroups() // Don't touch this either.
.registerDefaultCommands() // This you can remove if you'd like.
.registerCommandsIn(path.join(__dirname, 'commands')); // This is where our commands will have their place.
client.once('ready', () => { // On the event that the bot is ready during runtime, we want it to tell us who we are logged in as.
console.log(`Logged in as ${client.user.tag}!`);
});
client.on('message', message => { // This is completely optional. I made this for the sake of being able to monitor things.
if (message.guild != null) // Because we're a self-bot, we won't have the luxury of knowing if we're in a guild or not; this is a workaround.
{
console.log(`[${message.createdAt}] (${message.guild.name}) ${message.author.tag}: ${message.content}`);
return;
}
console.log(`[${message.createdAt}] ${message.author.tag}: ${message.content}`);
});
client.login("YOUR-DISCORD-TOKEN"); // Place your own Discord token here.
Once you've made the changes you want, we can move on to making some commands. Create a folder under your working folder called "commands" (it's important that it's lowercase or discordjs will whine). Once that's done, you can create as many folders as you want in there to keep more organized, like I have done here:
Now, let's create our first command. I will show you how to create the "setstatus" command; which will allow you to set your status on Discord to anything you want. (It will have "Playing" before the status, unfortunately)
const { Command } = require('discord.js-commando'); // We import the Commando library.
module.exports = class AnnoyCommand extends Command { // We adopt its functions.
constructor(client) {
super (client, {
name: 'status', // What the command will be called.
group: 'util', // Which group it'll belong to. You specified groups in the index.
memberName: 'status', // Same as name.
description: 'Sets the status of the user.', // A description in case you use the help command that comes with DiscordJS.
args: [ // We make an argument for what we want to set our status to.
{
key: 'status', // The key you can set to whatever you want, but I recommend you stay on point.
prompt: '`Specify what the status should be.`', // This will show up if you don't specify the argument in the one-line.
type: 'string' // The type of argument. This can be integer, string, member, user, etc.
}
]
});
}
run (message, {status}) // This is what will happen once the command is ran. Be sure that the variable inside the curly brackets {status} is the same as the key to your argument.
{
this.client.user.setActivity(status); // Set the status to the string the argument accepted.
return null; // Return nothing as we don't want any feedback.
}
}
And that's really it - you can now create all the commands you want and play around with the selfbot. Congratulations.
- Node (6.0.0 or higher) and NPM
- A text editor (I recommend Visual Studio Code)
When you're in Visual Studio, click on "File" at the top left and click on "Open Folder..." - go to some location where you'd like to have your project, and create a new folder through the file prompt. (You can also do this beforehand, but I am a messy head so I like to do it this way.) Then all you have to do is click the new folder and then click "Choose".
Once you're done with that, you will have a workspace to put your work in. Right-click the folder inside Visual Studio Code on the left side and make a new javascript file. You can call it anything, but for simplicity, let's call it "index.js". After you're done with that, you can now install the NPM packages needed to create your bot. Look at the top of Visual Studio Code and you should see "Terminal". Click it and then click "New Terminal".
This will open a CMD window inside your Visual Studio Code, so you can easily make changes to any packages or install new ones all in the same place. It will automatically make an instance inside your working folder. Once you've done that, write the following:
npm install discord.js discord.js-commando
After that has ran its course, we can start working on the index file I was talking about. Here's what it should look like to begin with:
const { CommandoClient } = require('discord.js-commando'); // We initialize the Commando Client (it has the basic Discord client included in the package)
const path = require('path'); // This is so your bot can find your commands.
const client = new CommandoClient({
selfbot: true, // Do not change this, this is where the magic lies
commandPrefix: '?', // You can change the prefix to anything you want.
owner: '', // Change this to your user ID
invite: '' // You can leave this empty or delete it.
});
client.registry
.registerDefaultTypes() // Don't touch this.
.registerGroups([
['fun', 'Fun Commands'], // Basic command group, change it if you want
['util', 'Utility Commands'], // Same here.
['info', 'Information Commands'] // Same here.
])
.registerDefaultGroups() // Don't touch this either.
.registerDefaultCommands() // This you can remove if you'd like.
.registerCommandsIn(path.join(__dirname, 'commands')); // This is where our commands will have their place.
client.once('ready', () => { // On the event that the bot is ready during runtime, we want it to tell us who we are logged in as.
console.log(`Logged in as ${client.user.tag}!`);
});
client.on('message', message => { // This is completely optional. I made this for the sake of being able to monitor things.
if (message.guild != null) // Because we're a self-bot, we won't have the luxury of knowing if we're in a guild or not; this is a workaround.
{
console.log(`[${message.createdAt}] (${message.guild.name}) ${message.author.tag}: ${message.content}`);
return;
}
console.log(`[${message.createdAt}] ${message.author.tag}: ${message.content}`);
});
client.login("YOUR-DISCORD-TOKEN"); // Place your own Discord token here.
Once you've made the changes you want, we can move on to making some commands. Create a folder under your working folder called "commands" (it's important that it's lowercase or discordjs will whine). Once that's done, you can create as many folders as you want in there to keep more organized, like I have done here:
Now, let's create our first command. I will show you how to create the "setstatus" command; which will allow you to set your status on Discord to anything you want. (It will have "Playing" before the status, unfortunately)
const { Command } = require('discord.js-commando'); // We import the Commando library.
module.exports = class AnnoyCommand extends Command { // We adopt its functions.
constructor(client) {
super (client, {
name: 'status', // What the command will be called.
group: 'util', // Which group it'll belong to. You specified groups in the index.
memberName: 'status', // Same as name.
description: 'Sets the status of the user.', // A description in case you use the help command that comes with DiscordJS.
args: [ // We make an argument for what we want to set our status to.
{
key: 'status', // The key you can set to whatever you want, but I recommend you stay on point.
prompt: '`Specify what the status should be.`', // This will show up if you don't specify the argument in the one-line.
type: 'string' // The type of argument. This can be integer, string, member, user, etc.
}
]
});
}
run (message, {status}) // This is what will happen once the command is ran. Be sure that the variable inside the curly brackets {status} is the same as the key to your argument.
{
this.client.user.setActivity(status); // Set the status to the string the argument accepted.
return null; // Return nothing as we don't want any feedback.
}
}
And that's really it - you can now create all the commands you want and play around with the selfbot. Congratulations.