Search code examples
reddit

Trying to build a bot that listens for it's own name to be tagged


I've been playing with the reddit API and I'd really like to make a bot that listens for someone to tag it in a comment, and then responds with a comment.

I've been looking through the docs here but haven't found what I'm looking for.

I've seen other bots do this in the past so I feel it must be possible.

If someone could point me in the right direction I'd really appreciate it.

Cheers.


Solution

  • If you use PRAW (Python Reddit API Wrapper), then you can use the redditor.inbox class to track "mentions". http://praw.readthedocs.io/en/latest/code_overview/reddit/inbox.html?highlight=Mentions

    Otherwise, AFAIK mentions are just another item in your inbox.

    https://reddit.com/r/redditscripting