-
Notifications
You must be signed in to change notification settings - Fork 71
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
Chat / Collaboration Channel #38
Comments
Hey @SebastianStehle Hope you're all doing well! I recently came across your project and I'm really impressed by the work you've done, and I'm excited about the possibility of contributing to it. I'm particularly interested in creating this Discord integration, but I'm open to helping out wherever needed. Is there any change my work might be merged? Or do you have any specific guidelines when it comes to contributing? |
Absolutely, sounds like a great idea to work on that. |
Great! Thank you so much! |
I think what the integration makes special is that you probably need an additional configuration to select a sub-channel. For example discord, teams, slack and so on. Either you push to all channels where the user has access to or only to selected sub-channels. This concept of sub-channels does not exist yet. |
So for example with the Discord integration - it works similarly to the Telegram and Webhook integration - there's one bot per app. And for example when sending a notification, in the second (Channels) tab - besides setting a template, user can select the Discord guild's channel(s) to send the notification to, right? |
The channels are just different communication methods that have a common behavior: For messaging we give each extension the opportunity to add targets to the job. Depending on the values that the user has. So if the user would have a Discord username (or other identifier) we would send the notification to this identifier. Perhaps we can just add the discord integration under the messaging channel? I think this should work fine. |
Okay, thank you for your reply! Will try to start working on it in my free time, starting from tomorrow. I'll keep you updated and ask you here if I have any questions. Have a nice day! |
I started working on the integration. For the bot to be able to send messages to the user on Discord via DMs (direct messages), they either have to share the same guild (also called server) or (and that's a new feature implemented recently) user has to "install" the app/bot on their account. Users just have to confirm "installing" the bot on their accounts. It can be also used to add the bot to the guild. User-installable apps will allow to DM the users without sharing the same guild, but on the other hand if we also implement an option to post on a given channel inside the guild and the user is in the guild with the bot, they don't have to "install the app" on their accounts (unless some privacy settings). What do you think? Should I implement the user-installable app or just require the bot to share a common guild with every user? More about user-installable apps: https://discord.com/developers/docs/change-log#userinstallable-apps-preview |
I would start with the simple approach. But you do not have to add a property to the user. e.g. have a look at telegram: The integration registers user properties and then sues them later: |
Also, I just discovered a few bugs not related to my integration, e.g. the user properties aren't saved on user upsert (to reproduce - add any integration that has user properties (e.g. Telegram) and try to update any user property (here: chat id) for any user). Sorry for asking a lot of questions, but as I said it's my first real open source contribution and I'd like to take it seriously and do my best 😉 |
Ideally you keep pull requests small and focuses. This is not always possible. You can create an issue first, but in my opinion it is not needed if solve the problem immediately. |
Channel for collaboration tools like Discord, Slack, Teams.
The text was updated successfully, but these errors were encountered: