fix: Update regex to capture custom emoji/sticker names with spaces and special characters
This commit is contained in:
parent
52e982518c
commit
1b022baf61
@ -1474,7 +1474,8 @@ async def get_ai_response(cog: 'GurtCog', message: discord.Message, model_name:
|
||||
content_to_process = final_parsed_data["content"]
|
||||
# Find all potential custom emoji/sticker names like :name:
|
||||
# Use a non-greedy match for the name to avoid matching across multiple colons
|
||||
potential_custom_items = re.findall(r':([\w\d_]+?):', content_to_process)
|
||||
# Regex updated to capture names with spaces and other characters, excluding colons.
|
||||
potential_custom_items = re.findall(r':([^:]+):', content_to_process)
|
||||
modified_content = content_to_process
|
||||
|
||||
for item_name_key in potential_custom_items:
|
||||
|
Loading…
x
Reference in New Issue
Block a user