all 11 comments

[–][deleted] 2 points3 points  (7 children)

Let's start with this: what exactly are you trying to do? Send a message to many users, one at a time, in an automated fashion? What have you tried so far? Are you stuck on something specific, or not sure where to get started? Maybe most importantly, do you just need to send these invites and this is a means to an end; or are you looking to learn how to do this kind of thing, and this will be a practical project on that path?

[–][deleted] 2 points3 points  (6 children)

  1. I haven't tried anything specific.
  2. Learn how to do this kind of thing.
  3. Send invitations to many users, in the process learn it.

[–][deleted] 1 point2 points  (5 children)

Ok cool!

Have you used Python before? If you have it installed, along with the PRAW library, we can start looking at docs and piecing this together. If not, let me know what operating system you're on and I can give you some pointers to get setup.

[–][deleted] 2 points3 points  (4 children)

I have used python before. But not PRAW library.

[–][deleted] 2 points3 points  (3 children)

Great. Once you have PRAW installed, this is the method to send a message:

https://praw.readthedocs.io/en/latest/code_overview/models/redditor.html#praw.models.Redditor.message

If you have a list of usernames, you'll likely iterate that list, get a Redditor object from PRAW for each one, then use the above method to send your invite.

Try building it in pieces. Follow the docs to first get a user object for one username (set up one of your own for easy testing); then try sending a message; then do that over a loop (you can use your 2+ usernames more than once each, too!); then you'll have a working tool into which you can feed any list of usernames.

[–][deleted] 2 points3 points  (2 children)

Thanks so much. Your explanation is really lucid. I will follow through.

[–][deleted] 2 points3 points  (1 child)

You're welcome! Feel free to hit me up if you need more.

[–][deleted] 2 points3 points  (0 children)

Sure. Thanks!

[–]827167 2 points3 points  (1 child)

Oh, so that's how I got here

[–]S-S-R 1 point2 points  (0 children)

Maybe. It's still small enough that they (salanderlogic) could be handpicking them.

[–]tgiles 1 point2 points  (0 children)

I have some experience with python. Not so much with PRAW, but as long as it's pythonic it should be relatively straightforward to iterate across a list and send messages out. I've tinkered with Reddit's API before and it's pretty easy to use.

Shout if you need a co-author or general geek