wondrous-dev / wondrous-frontend

wondrous-frontend.vercel.app
GNU General Public License v3.0
15 stars 5 forks source link

Creating Discord bots for helping DAOs onboard members onto Wonder #37

Open andywong418 opened 3 years ago

andywong418 commented 3 years ago

This is important for DAOs to direct new members to our platform so they can start contributing

stammbach commented 3 years ago

Hey, like I said in the Discord, i'd like to challenge this. Started fiddling around and exploring some ideas. But there are some things that need to be sorted out for this.

If you want I can layout some of my ideas here or I can invite to my test server, but like I said, mostly exploration rn.

andywong418 commented 3 years ago

@stammbach This is dope! We'll look into getting the hosts running- I've worked with Digital Ocean before but if you have experience with Vultr we can go with that. Would love to get some help on that.

Curious to hear what the restructuring on the Discord Server might mean - also looping in @Lonisss who mentioned he might be interested in helping out here too!

stammbach commented 3 years ago

@andywong418 personally I used Digital Ocean in the past. Easy of use is definitely given there, also because they got preconfigured VMs for stuff like Node out of the box. I would write it in Node using Discord.js because it seems to be the most complete solution out there and I already started with it. Just mentioned the other options because you guys might already work with another host and Vultr was popping up frequently regarding Bot hosting for example.

And restructuring sounds worse that it would actually be. Personally I would suggest that most of the channels are gonna be hidden by default. Because it's just a lot to grasp for new users joining it (myself included).

I think we would need to incorporate a more guided flow on starting at the discord.

  1. Joining in a "start" channel being prompted with a nice welcome message and community guidelines/rules
    • Users then have to accept the guidelines via a reaction (like on most discords nowadays)
    • When user accept/react to the guidelines they get a "member" role which grants them access to basic channels including the information category and a new "getting around" channel
  2. The "getting around" channel would then let users choose what they are interested into; either connecting with the community or contributing to wonder
    • Users would then self-add rules using discord buttons; "Community" or "Contribution Candidate"
    • Each role would unlock either the community and/or the contribution/wonder-product category
    • Each category would also introduce a getting started channel where
      • Community: Choose desired communities: GM, LGBTW, MEMES, etc
      • Contribution: Applying to Product, Growth, Engineering via custom Commands -> see 3.
  3. Reworking Wonder-Product to be closed by default and automating Candidates via Commands; this would also require storing discord user ids, but sqlite should be enough to handle this on the bot VM itself
    • Apply Commands would post Applications via a shared Channel
    • "Contribution Managers" / Admins can then either accept or decline those Applications
andywong418 commented 3 years ago

Just checked everything out looks great! I understand the restructure now - each roles unlocks different channels both public and private.

  1. Love the start channel idea and this makes sense
  2. Agreed with all points but I think certain community channels like 'Report' and 'Community Management' should be open by default to all
  3. What applications would these be - is this for vetting candidates for specific working groups like Engineering, product etc? sqlite makes sense for storage within a discord channel
stammbach commented 3 years ago
andywong418 commented 3 years ago
  1. Makes sense!
  2. Interesting so this is assuming we want to vet contributors before they contribute. I think having an intro with GitHub/Gitlab link is a good idea, but think contributors should have a chance to prove themselves by taking tasks and creating PRs rather than through their resume or previous GitHub work.
stammbach commented 3 years ago

3: Like i said it's just exploration. Got no issue with that. Could also make it self-joinable like on the other groups. But I would definitely add a Contributor role for people who already have contributed to separate a little and improve visibility. Also because they might get mentioned even tho they just started exploring. Just want to minimize the load on new users as much as possible.

For that self joining we could then also use buttons or keep the command idea to at least prompt a little about me text, that's basically happening rn anyway!

andywong418 commented 3 years ago

Connecting each task to Github and Discord (when we have our task management out) will be a great feature as well :)

stammbach commented 3 years ago

@andywong418 depends on how that task management will work on the end; ultimately users then need to be able to connect their wonder account with github & discord using oauth for this to work. But in the end the result would be awesome of course.

andywong418 commented 3 years ago

I guess I meant finishing a task via Github would add a message to a channel on Discord. This wouldn't need each member to add oauth right?

stammbach commented 3 years ago

Oh okay! I think there are GH Webhooks that could be implemented for that.

Thought you meant that there will be like a automatic role update and announcement when the actual wonder task is completed. But for that to work the wonder account would at least had to be connected with Discord to work.

andywong418 commented 3 years ago

@robertDurst is working on #30 and so yeah we should just make the Wonder Github org connected with Discord to update a channel when tasks get completed. What do you think?

jreeter commented 3 years ago

I read recently that we could use AWS Lambda or GCP Functions for a bot with endpoint integration? This is pretty interesting, here's an article on a Lambda approach: https://gemisis.medium.com/building-a-serverless-discord-bot-on-aws-5dc7d972c9c6

btw, would love to help with this issue.

andywong418 commented 3 years ago

@jreeter Yes definitely would be great to have you work on this as well - also really like the GCP functions idea. What are your thoughts @stammbach?

stammbach commented 3 years ago

Very interesting. But we have to factor in the long term. You can choose what type of events you want to handle via the Bot, problem is when we might for example, filter messages using keywords, every message sent on the discord would then result in one Lambda/GCF/Workers call which would then also increases the cost of running it at the end.

Also for Lambda you not only pay per million calls, you also pay for the compute units (CPU time basically). I think GCF works in a similar fashion.

Another point would be that the handling would be a lot more manual; most libraries expect to run a server all the time instead of working in a webhook fashion.

But if thats a better solution for you guys I could look into it. Personally I would suggest Cloudflare Workers then; they are really cheap and eliminate the cold start you would have on Lambda/GCP, which would also improve working with Discord because the medium article said something about a requirement of responding within 3 seconds.

andywong418 commented 3 years ago

We have the capabilities of writing our own servers so maybe that would be a better way to go esp to save cost and to add custom functionality. I do think we would need to listen to webhooks on our server anyway though

Looking into hosting servers versus using GCP might be prudent, my thinking is that for high traffic (high call of APIs) hosting our own server would be less costly but I haven't used serverless that much so I might be wrong.

stammbach commented 3 years ago

Both have their advantages; with serverless huge traffic peaks should be no issue for example. But in the end it highly depends on what we want to do with the bot in the long run and even more how much traffic/action is happening on the discord itself. There are some basic community insight for the server right? Can you figure out how many messages are send per day on average? That would be a nice baseline to actual calculate any pricing options. (especially serverless pricing)