Compare commits

...

2 Commits

Author SHA1 Message Date
efa84c6bae Removed unused variables 2022-08-30 15:28:14 -07:00
db5d8cfc5a Updated to include optional explicit rating 2022-08-30 15:28:03 -07:00
2 changed files with 10 additions and 14 deletions

View File

@ -19,13 +19,15 @@
from collections import OrderedDict from collections import OrderedDict
def setup_profile(name, backend, tags, message, message_nsfw): def setup_profile(name, backend, tags, banned_tags, message, message_nsfw, force_nsfw=None):
post_setting = { post_setting = {
"name": name, "name": name,
"backend": backend, "backend": backend,
"tags": tags, "tags": tags,
"banned_tags": banned_tags,
"message": (message,), "message": (message,),
"message_nsfw": (message_nsfw,) "message_nsfw": (message_nsfw,),
"force_nsfw": force_nsfw
} }
return post_setting return post_setting
@ -59,8 +61,6 @@ settings_credentials = {
} }
} }
settings_banned = tuple()
# Basic settings to configure Yandere Bot's behavior # Basic settings to configure Yandere Bot's behavior
settings_behavior = { settings_behavior = {
"max_size": 15*1024*1024, "max_size": 15*1024*1024,
@ -87,14 +87,12 @@ settings_time = {
"long_date_week": "%m/%d/%Y %I:%M%p, %A" "long_date_week": "%m/%d/%Y %I:%M%p, %A"
} }
banned_tags = (
"guro", "scat", "yaoi", "implied_yaoi", "bara", "male_focus", "futanari"
)
# Apply post settings # Apply post settings
settings_post = ( settings_post = (
setup_profile("danbooru.random", "danbooru_backend", ("random",), "#random", "#random #lewd #nsfw"), setup_profile("danbooru.random", "danbooru_backend", ("random",), banned_tags, "#random", "#random #lewd #nsfw", None),
setup_profile("danbooru.yandere", "danbooru_backend", ("yandere",), "#yandere", "#yandere #lewd #nsfw"), setup_profile("danbooru.yandere", "danbooru_backend", ("yandere",), banned_tags, "#yandere", "#yandere #lewd #nsfw", None),
) )
# Default post behavior:
# If no profile can be matched in a master_list, it will default to settings_post_default
# If settings_post_default is None, the bot will error out and output the offending line(s)
# If you want the bot to start, set this to a valid settings_post, or create a default setting with setup_profile()
settings_post_default = None

View File

@ -41,7 +41,6 @@ class YandereBot:
settings_behavior = None settings_behavior = None
settings_time = None settings_time = None
settings_post = None settings_post = None
settings_post_default = None
settings_encrypt = None settings_encrypt = None
settings_credentials = None settings_credentials = None
@ -85,7 +84,6 @@ class YandereBot:
"settings_behavior", "settings_behavior",
"settings_time", "settings_time",
"settings_post", "settings_post",
"settings_post_default",
"settings_encrypt", "settings_encrypt",
"settings_credentials", "settings_credentials",
) )