diff --git a/plugins/stable-diffusion.py b/plugins/stable-diffusion.py index 32b51dd..02fd148 100644 --- a/plugins/stable-diffusion.py +++ b/plugins/stable-diffusion.py @@ -65,7 +65,7 @@ async def handle_command(room, message, bot, prefix, config): r = response.json() # Slugify the prompt - prompt_slug = (prompt) + prompt_slug = prompt[:120] # Construct filename filename = f"{prompt_slug}_{args.steps}_{args.h}x{args.w}_{sampler_name}_{args.cfg}.jpg" diff --git a/plugins/youtube-preview.py b/plugins/youtube-preview.py index ab0bdd6..9613c58 100644 --- a/plugins/youtube-preview.py +++ b/plugins/youtube-preview.py @@ -32,7 +32,7 @@ async def fetch_youtube_info(youtube_url): async def handle_command(room, message, bot, prefix, config): match = botlib.MessageMatch(room, message, bot, prefix) - if match.is_not_from_this_bot() and re.search(r'youtube\.com/watch\?v=', message.body): + if match.is_not_from_this_bot() and re.search(r'youtube\.com/watch\?v=', message.body) and room.room_id != '!uFhErnfpYhhlauJsNK:matrix.org': logging.info("YouTube link detected") video_id_match = re.search(r'youtube\.com/watch\?v=([^\s]+)', message.body) if video_id_match: