2
0
mirror of https://github.com/Nick80835/microbot synced 2025-08-31 22:46:01 +00:00

implement pass_nsfw

This commit is contained in:
Nick80835
2020-06-26 15:02:38 -04:00
parent a4d7dce42a
commit 87dd2934bd
3 changed files with 15 additions and 9 deletions

View File

@@ -48,6 +48,8 @@ class CommandHandler():
if value["nsfw"] and str(event.chat.id) in self.settings.get_list("nsfw_blacklist"):
print(f"Attempted NSFW command ({event.text}) in blacklisted chat ({event.chat.id}) from ID {event.from_id}")
continue
elif value["pass_nsfw"]:
event.nsfw_disabled = str(event.chat.id) in self.settings.get_list("nsfw_blacklist")
event.pattern_match = pattern_match
event.args = pattern_match.groups()[-1]