def handle_username_mention_message(reddit, message):
     try:
         Logger.log('Username mention message')
         message.reply(inbox.compose_username_mention_reply(str(message.author)))
         message.mark_as_read()
     except Exception as e:  # Figure out more specific exception thrown (praw.exceptions.APIException?)
         Logger.log(Color.RED, str(e))
         Logger.log(Color.RED, 'Handled RateLimitExceeded praw error - Commenting too frequently')
     reddit.send_message(accountinfo.developerusername, 'USERNAME MENTION', inbox.compose_username_mention_forward(accountinfo.developerusername, str(message.author), message.body))
     reddit.send_message(accountinfo.developerusername2, 'USERNAME MENTION', inbox.compose_username_mention_forward(accountinfo.developerusername2, str(message.author), message.body))
Пример #2
0
 def handle_post_reply_message(reddit, message):
     Logger.log('Post reply message')
     reddit.send_message(
         accounts['developer']['username'], 'USERNAME MENTION',
         inbox.compose_username_mention_forward(
             accounts['developer']['username'], str(message.author),
             message.body))
     message.mark_read()
Пример #3
0
 def handle_username_mention_message(reddit, message):
     Logger.log('Username mention message')
     try:
         InboxHandler.reply(message, inbox.compose_username_mention_reply(str(message.author)))
         message.mark_read()
         reddit.send_message(accounts['developer']['username'], 'USERNAME MENTION',
                             inbox.compose_username_mention_forward(accounts['developer']['username'],
                                                                    str(message.author), message.body))
     except Exception as e:  # Figure out more specific exception thrown (praw.exceptions.APIException?)
         Logger.log(str(e), Color.RED)
         Logger.log('Handled RateLimitExceeded praw error - Commenting too frequently', Color.RED)
 def handle_post_reply_message(reddit, message):
     Logger.log('Post reply message')
     reddit.send_message(accountinfo.developerusername, 'USERNAME MENTION', inbox.compose_username_mention_forward(accountinfo.developerusername, str(message.author), message.body))
     reddit.send_message(accountinfo.developerusername, 'USERNAME MENTION', inbox.compose_username_mention_forward(accountinfo.developerusername2, str(message.author), message.body))
     message.mark_as_read()