TwitterFollowBot icon indicating copy to clipboard operation
TwitterFollowBot copied to clipboard

Can I run multiple action in the same .py?

Open DraxFTW opened this issue 9 years ago • 4 comments

for an example like this;

my_bot = TwitterBot() my_bot.auto_follow("@ShoutGamers")

from TwitterFollowBot import TwitterBot

my_bot = TwitterBot() my_bot.auto_fav("@ShoutGamers", count=1000)

will this both work? or just the top one.

DraxFTW avatar Nov 25 '16 02:11 DraxFTW

Yes, you can do that. You don't even need to create a new instance of the TwitterBot; you can just follow one function call with another:

from TwitterFollowBot import TwitterBot
my_bot = TwitterBot()
my_bot.auto_follow("@ShoutGamers")
my_bot.auto_fav("@ShoutGamers", count=1000)

rhiever avatar Nov 28 '16 21:11 rhiever

Sorry for hijacking this post but what if you wanted to run 3 accounts to follow 1000 people each day. Could i put them all under one .py?

ghost avatar Dec 04 '16 18:12 ghost

Yes, if you create different TwitterBot instances pointing to your separate config files.

rhiever avatar Dec 05 '16 19:12 rhiever

Thank you ive done that just worried that within the 24 hours each day the 3 accounts will not follow 1000 people each if that makes sense. If i put them all in one py will they all be following accounts at the same time or would it be one account following till 1000 before the next account starts following

ghost avatar Dec 05 '16 22:12 ghost