@
@
@pyshvel2021-10-26 11:06:37
Python
@pyshvel, 2021-10-26 11:06:37

How to run multiple discord bots at the same time?

Let's say I have a tokens.txt file that stores bot tokens in the format:

токен
токен
...

I need to run the same bot on these tokens at the same time with 1 file.
How to implement this?
No,
client.run(token1)
client.run(token2)

does not work

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viktor Golovanenko, 2021-10-26
@drygdryg

Create multiple client instances:

import discord

client1 = discord.Client()
client2 = discord.Client()

...
...

client1.run(token1)
client2.run(token2)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question