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

Don't define replies explicitly in code #32

Open
LeafHacker opened this issue Aug 27, 2019 · 2 comments
Open

Don't define replies explicitly in code #32

LeafHacker opened this issue Aug 27, 2019 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@LeafHacker
Copy link
Contributor

Instead of defining replies in the code, we could load them on launch or something. Perhaps pass in a file as an argument on launch or something?

@LeafHacker LeafHacker added enhancement New feature or request good first issue Good for newcomers labels Aug 27, 2019
@LeafHacker
Copy link
Contributor Author

One option would be to load replies from impactclient.net/bot_replies.json, which could be proxied or redirected to the Resources repo by cloudflare or impactserver. We could then implement a i!reload command to reload the replies without restarting the bot.

Another option would be to use one of github's apis to get push-notifications of changes on the resources repo and pull in replies.json on every commit there, similar to how CI and heroku get push notified.

@LeafHacker
Copy link
Contributor Author

Constants like user and channel IDs would need storing in the JSON and parting into the reply strings too.

Might be worth using a JSON alternative like yaml to allow raw-string literals for the regexes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant