pyslackers/sirbot-pythondev

Prepare sirbot for the 7k members

Closed this issue ยท 12 comments

ovv commented

@SirBotALot should trigger for the 7k member and start the party

Maybe this should be every round 1,000 members - instead of being specific to 7k?

@ovv, Any ideas for what you want party-wise?

ovv commented

blackjack and hookers !

A message that notify #general of the new milestone would be a good start.
If you want to try it I can give some pointers if needed :)

That would be great, I'll have a go. I'll need to test the blackjack and hookers - so I'll just send you the bill @ovv?
So, having a quick look, I guess gathering user count will be done from the sirbot-slack repo and then sending the message from sirbot-pythondev/sirbot/pythondev/slack.py?

ovv commented

I don't think you'll need to modify anything in sirbot-slack.

I would do it like this:

  1. register an event listener for member_joined_channel
  2. When receiving an event like it check if it's for #general (nobody can leave general so we have the full members count here)
    message.to.id == await slack.channels.get(name='general').id
  3. Update the general channel to retrieve the full member count
    await slack.channels.get('general', update=True)
  4. do nothing / post a message if members are a multiple of 1000

Ah ok, that helps a lot - great thanks, I'll get on it, thanks, @ovv

ovv commented

Don't hesitate if you want me to test things as I have everything setup and documentation is still non-existent ๐Ÿ˜ญ

@ovv, I think - I may have something that may do it. Whats the easiest way to test it? I've pushed it to my fork, branch is feature/1000_users_event. Is it easier if you test it before I make a PR?

@nik849 - you can create a new slack team and connect it all to that. I think @ovv has docs on how to bring all then together

ovv commented

You can try to set everything up by creating a slack team and everything (the ansible playbook might give you some tips how to do that) or open a PR and I'll test it :)

there isn't any doc on how to easily set everything up yet.

Ok, I'll give it a go, i'd rather test it first than just create a PR if i can. thanks! ๐Ÿ‘

ovv commented

Closed by #36 thanks @nik849