Skip to content

Commit

Permalink
Merge pull request #9 from LobaDK/dev
Browse files Browse the repository at this point in the history
Merge dev branch into main
  • Loading branch information
LobaDK authored May 23, 2024
2 parents 9d46327 + 274ce58 commit 054c5ba
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 5 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
__pycache__
.venv
.vscode
.env
*.exe
ff*
Expand Down
28 changes: 28 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
]
}
5 changes: 1 addition & 4 deletions cogs/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 054c5ba

Please sign in to comment.