DiscordSelfBot

  1. Better view
  2. Download
  3. Description
  4. Installation
  5. Token
  6. Commands
  7. Annotations
  8. Creating your own extension

Description

A nice selfbot for discord

Installation

For installation you will need

Token

How to get your token: On Discord App:

  1. Press ctrl/cmd+shift+i
  2. Press the 2 arrows next to each other in the top. (https://cdn.impulsebot.com/RUQzKW71Yz.png)
  3. Click ‘Application’. (https://cdn.impulsebot.com/xrU5OwDIxu.png)
  4. Click ‘Local Storage’. (https://cdn.impulsebot.com/Yc20dD5Igu.png)
  5. Click whatever URL you can see there. (https://cdn.impulsebot.com/StsccmaCHU.png)
  6. Double click ‘token’. (https://cdn.impulsebot.com/kdtDPvDeGi.png)
  7. Press ctrl/cmd+c.
  8. When pasting it is not required to remove the double quotes, but you can. On Discord Website: The same as above but you press F12 (above the backspace) instead of ctrl/cmd+shift+i.

Commands

Annotations

[] = optional.

<> = needed.

[p] = the prefix you set.

Extensions

So you want to make your own extension?

Well that’s pretty easy, all you need to begin with is this:

import discord
import __main__ as main

class myextension:
    """My custom extension that does stuff!"""
    
    def __init__(self, bot):
        self.bot = bot
        
    async def on_message(self, message):
        msgchan = message.channel
        if await main.command(message, "hi", True):
            await main.say(msgchan, "Hi!")
            
        elif await main.command(message, "Hello", True):
            await main.say(msgchan, "Hello!")
            
def setup(bot):
    bot.add_cog(myextension(bot))

This will let the bot say “Hi” when you do [p]hi and “Hello!” when you do [p]hello.

Save this as myextension.py in the extensions folder of your bot, then load it with [p]load myextension.

Adding the commands to the help command

If you want to add the commands that you made you would just have to put

main.cmds['your_extension_name'] = {'command_one': {'help': 'What is this command for?', 'usage': 'how to use?'},
                                    'command_two': {'help': 'What is this command for?', 'usage': 'how to use?'}}

Under __init__

For example, with the extension I just made you would have to put there:

main.cmds['myextension'] = {'hi': {'help': 'Let\'s the bot say hi!', 'usage': 'hi'},
                            'hello': {'help': 'Let\'s the bot say hello!', 'usage': 'hello'}}

So the end result should look like:

import discord
import __main__ as main

class myextension:
    """My custom extension that does stuff!"""
    
    def __init__(self, bot):
        self.bot = bot
        main.cmds['myextension'] = {'hi': {'help': 'Let\'s the bot say hi!', 'usage': 'hi'},
                                   'hello': {'help': 'Let\'s the bot say hello!', 'usage': 'hello'}}
        
    async def on_message(self, message):
        msgchan = message.channel
        if await main.command(message, "hi", True):
            await main.say(msgchan, "Hi!")
            
        elif await main.command(message, "Hello", True):
            await main.say(msgchan, "Hello!")
            
def setup(bot):
    bot.add_cog(myextension(bot))