Inheriting from thread
Closed this issue · 0 comments
jedevc commented
It is generally seen as bad practice to inherit from a thread. It is better to write the bot and then run it from the thread.
Something like this:
import threading
def foo():
for i in range(2000):
print(i)
t = threading.Thread(target=foo)
t.start()
t.join()
Also, you don't need to worry about threads really at all if you're planning to use my bot lib. You can in fact have a group of bots which manages the threads and everything. You just write the bot as normal and then the ExecutableGroup manages it.