Checked for sender flair as well
This commit is contained in:
@@ -274,6 +274,11 @@ class ChristmasBot:
|
|||||||
def handle_new_request(self, message, sender):
|
def handle_new_request(self, message, sender):
|
||||||
target_user, wish_content = self.parse_new_wish_request(message)
|
target_user, wish_content = self.parse_new_wish_request(message)
|
||||||
|
|
||||||
|
if not self.verify_user_flair(sender):
|
||||||
|
message.reply(f"Sorry, u/{sender} but you do not have an active Flair in r/{config.subreddit_name}.\n"
|
||||||
|
"We only allow wishes for active, flaired community members.")
|
||||||
|
return
|
||||||
|
|
||||||
# ERROR: Bad Format
|
# ERROR: Bad Format
|
||||||
if not target_user:
|
if not target_user:
|
||||||
reply = ("I couldn't understand your request. Please format your message exactly like this:\n\n"
|
reply = ("I couldn't understand your request. Please format your message exactly like this:\n\n"
|
||||||
|
|||||||
Reference in New Issue
Block a user