Beispiel #1
0
	def _get_response(video_url, post):
		title = "Possible YouTube vote solicitation"
		body = "Check the video description to see if they're asking for upvotes.\n\n" \
			   "* Video: {video_url}\n" \
			   "* User: {author}\n" \
			   "* Permalink: {permalink}\n"
		body = safe_format(body, video_url=video_url)
		
		return FilterResult.MESSAGE, {"log": (title, body), "modmail": (title, body)}
Beispiel #2
0
	def _get_response(self, bl_subreddit):
		title = "Blacklisted subreddit contributor"
		body = "A contributor to a blacklisted subreddit was removed.\n\n" \
			   "* Blacklisted subreddit: {bl_sub}\n" \
			   "* User: {author}\n" \
			   "* Permalink: {permalink}\n"
		body = safe_format(body, bl_sub=bl_subreddit)
		
		return FilterResult.REMOVE, {"log": (title, body), "ban": self.ban}
Beispiel #3
0
	def _get_watch_info(channel_info):
		channel_id, channel_name = channel_info
		title = "Monitored YouTube channel: {}".format(channel_name)
		body = "A monitored channel was submitted.\n\n" \
				"* Channel: {channel_name} ({channel_id})\n" \
				"* User: {author}\n" \
				"* Permalink: {permalink}"
		body = safe_format(body, channel_name=channel_name, channel_id=channel_id)
		
		return {"log": (title, body)}
Beispiel #4
0
	def _get_ban_info(channel_info):
		channel_id, channel_name = channel_info
		title = "Banned YouTube channel: {}".format(channel_name)
		body = "A banned channel was removed.\n\n" \
				"* Channel: {channel_name} ({channel_id})\n" \
				"* User: {author}\n" \
				"* Permalink: {permalink}"
		body = safe_format(body, channel_name=channel_name, channel_id=channel_id)
		
		return {"log": (title, body), "modmail": (title, body)}
Beispiel #5
0
	def _get_response_max(self, video_url, post):
		title = "YouTube video duration too long"
		body = "This video should have been in a self post.\n\n" \
			   "* Video: {video_url}\n" \
			   "* User: {author}\n" \
			   "* Permalink: {permalink}\n"
		body = safe_format(body, video_url=video_url)
		
		reply = self.reply + "\n\n---\n\n" \
				"*This action was performed by a bot. If you believe it is a mistake, please [message the mods](https://reddit.com/message/compose?to=%2Fr%2F{subreddit}).*"
		
		print("Video too long!")
		return FilterResult.REMOVE, {"log": (title, body), "reply": reply}