mirror of
https://github.com/Paillat-dev/Botator.git
synced 2026-01-02 09:16:19 +00:00
Update ChatProcess.py
This commit is contained in:
@@ -118,7 +118,7 @@ class Chat:
|
|||||||
name = "assistant"
|
name = "assistant"
|
||||||
else:
|
else:
|
||||||
role = "user"
|
role = "user"
|
||||||
name = msg.author.global_name
|
name = msg.author.display_name or msg.author.global_name or msg.author.name
|
||||||
# use re not make name match ^[a-zA-Z0-9_-]{1,64}$ by removing all non-alphanumeric characters
|
# use re not make name match ^[a-zA-Z0-9_-]{1,64}$ by removing all non-alphanumeric characters
|
||||||
name = re.sub(r"[^a-zA-Z0-9_-]", "", name, flags=re.UNICODE)
|
name = re.sub(r"[^a-zA-Z0-9_-]", "", name, flags=re.UNICODE)
|
||||||
if name == "":
|
if name == "":
|
||||||
|
|||||||
Reference in New Issue
Block a user