Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running multiple discord tokens? #66

Open
bokja opened this issue Jul 13, 2020 · 2 comments
Open

Running multiple discord tokens? #66

bokja opened this issue Jul 13, 2020 · 2 comments

Comments

@bokja
Copy link

bokja commented Jul 13, 2020

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
Copy link
Owner

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
Copy link
Author

bokja commented Jul 14, 2020

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

@bokja bokja closed this as completed Jul 14, 2020
@bokja bokja reopened this Jul 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants