diff --git a/.gitignore b/.gitignore index cbfd0b1..fabaab6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ __pycache__ .venv -.vscode .env *.exe ff* diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..7bfeced --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,28 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Main Bot", + "type": "debugpy", + "request": "launch", + "program": "${workspaceFolder}/QuantumKat.py", + "console": "integratedTerminal", + "env": { + "TOKEN_TYPE": "Main" + } + }, + { + "name": "Dev Bot", + "type": "debugpy", + "request": "launch", + "program": "${workspaceFolder}/QuantumKat.py", + "console": "integratedTerminal", + "env": { + "TOKEN_TYPE": "Dev" + } + } + ] +} \ No newline at end of file diff --git a/cogs/utils/utils.py b/cogs/utils/utils.py index a533d3e..bc9c4d0 100644 --- a/cogs/utils/utils.py +++ b/cogs/utils/utils.py @@ -405,10 +405,7 @@ def get_urls_in_message(message: str) -> list: Returns: - list: A list of URLs found in the message. """ - return findall( - r"http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\\(\\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+\.[a-zA-Z]{2,6}(?:/[^\s]*)?", - message, - ) + return findall(r"https?://[^\s]+", message) def calculate_tokens(user_message: str, system_message: str) -> int: