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

Start commands at defined time #27

Open
sgrunt91 opened this issue Apr 11, 2015 · 4 comments
Open

Start commands at defined time #27

sgrunt91 opened this issue Apr 11, 2015 · 4 comments

Comments

@sgrunt91
Copy link

Hello,

I'm not a developper, i don't know many things of Python, and I don't understand 80% of your Bot :-)

But, I want to use your project to made a Bot for fun, and I've added some new commands and also the send image functionnality. So, I'm not also a big noob and I'm learning quite fast.

I just want to know if it's possible to execute a command defined in ExtraCommands.py at a defined time, for example everyday at 9am ?
And if it's possible, what is the best practice to do that with your code?

Hope you understand me and could help me :)

Best Regards !

@wardellbagby
Copy link
Owner

@sgrunt91 Hmm. Currently, I don't have the means for a time-based command like that, but I think it would be possible to add in a feature like that. Let me see what I can do for you.

@cntrlwiz
Copy link
Contributor

I would also like to have something similar...In the game Ingress, there are defined checkpoints that happen every 5 hours. I would like to be able to call out these checkpoints when they occur, and also to have a optional countdown mode where I could set 60,30,15,10,5,4,3,2,1 minutes-to-checkpoint warnings.
I looked at doing this through the existing /remind structure, but haven't gotten very far with it.

@sgrunt91
Copy link
Author

Thanks for the replies !

For now, I've just added a thread in Bot.py which is an infinite loop and check the time and if it's my time do what I want. And I run it in the run(), and it's work.
But it's probably very ugly for real developers... And also, I don't understand how to call bot's commands from my thread, so I don't know if I will keep that...

If you have already basic ideas to make that and no time, I could try to develop it, and you could accept or reject the code. I mean that I'm not necessary asking you to make it, just pointing me the right way to do it ;)

Thanks again !

@nylonee
Copy link

nylonee commented Apr 18, 2015

@cntrlwiz be sure to check out the checkpoint.py plugin for nylonee/hangupsbot.

Also, if you're Resistance, hit me up on hangouts please :P

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

4 participants