Kr4ken-9 / DAB

Discord Automation Bot - A selfbot that automates other bots, including Pokecord (formerly) and now PokeTwo and PokeRealm.
GNU General Public License v3.0
18 stars 12 forks source link

Running multiple discord tokens? #66

Open bokja opened 4 years ago

bokja commented 4 years ago

I mean i know this isnt the place to ask but as i am using your modified library i was wondering if there was a way to start 2 instances of the bot within the same program i tried calling dab with threading but i get an error bilde

`class DAB(commands.bot.Bot): def init(self, _onfig_directory, command_prefix, proxy): super().init(command_prefix=command_prefix, self_bot=True, fetch_offline_members=False, proxy=proxy)

async def on_ready(self):
    print("\nLogged in as")
    print(self.user.name)
    print(self.user.id)
    print("------")

async def on_message(self, message):
    await self.wait_until_ready()`

`def thread_function(): x = 0 client = DAB("Depricated", "+", "http://" + proxies[x]) print(tokens[x] + " " + proxies[x]) client.run(tokens[x], bot=False) print(tokens[x] + " " + proxies[x])

t1 = threading.Thread(target=thread_function) t1.start()`

I also tried this but the code stops running after client.run() and any code after that is ignored i very new to python do you know the reason by any chance

for x in range(0,2): client = DAB("Depricated", "+", "http://" + proxies[x]) print(tokens[x] + " " + proxies[x]) client.run(tokens[x], bot=False)

Any help would be much appreciated

Kr4ken-9 commented 4 years ago

I think in the past I was able to run two instances of DAB with the commandline -c option.

  1. Copy and paste Configs
  2. Edit token in second config
  3. python main.py -c FirstConfigDirectory
  4. python main.py -c SecondConfigDirectory

This should still work

bokja commented 4 years ago

Yeah i mean sure it would work to run 2 instances but thats kinda annoying i want to run 1 program to handle all my discord accounts, but thanks anyway