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

Welcome plugin #3

Open
andrewthetechie opened this issue Sep 25, 2020 · 3 comments
Open

Welcome plugin #3

andrewthetechie opened this issue Sep 25, 2020 · 3 comments

Comments

@andrewthetechie
Copy link
Member

Setup a plugin that welcomes new users.

Should send a DM to the new user.

Ask them how they found us -> send the answer to the admins/a channel for review

Suggest a list of channels to join -> make this dynamically configurable so we can change it without a PR.

@epequeno
Copy link
Member

epequeno commented Sep 26, 2020

errbot does not currently handle the team_join event: errbotio/errbot@ae71f7b

I don't think there's a way for me to configure a callback for it directly in errbot.

slackclient has this onboarding example which would require flask running to listen for the event:
https://github.com/slackapi/python-slackclient/blob/7a045607fde73d252e9e74a1b2f397b88a7d50af/tutorial/PythOnBoardingBot/app.py#L44

here's an example of using the rtm client:
https://github.com/slackapi/python-slackclient/blob/7a045607fde73d252e9e74a1b2f397b88a7d50af/tutorial/PythOnBoardingBot/async_app.py#L42

if webhooks are ok then using this approach might be easiest: https://errbot.readthedocs.io/en/latest/user_guide/plugin_development/webhooks.html

@epequeno
Copy link
Member

we had also discussed sqlite and having multiple clients.

This states sqlite can support multi threaded applications https://sqlite.org/threadsafe.html

@epequeno
Copy link
Member

after discussing this with @andrewthetechie the current plan is to use the built in callback for when a member joins a channel
https://github.com/errbotio/errbot/blob/43b0733e4e79465c15a559c06d411271dcd35564/errbot/backends/slack.py#L426
https://github.com/errbotio/errbot/blob/43b0733e4e79465c15a559c06d411271dcd35564/errbot/backends/slack.py#L551

Since we're sub-classing we should be able to simply override the method and add our logic there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants