diff --git a/commands/__pycache__/mouse_movement.cpython-311.pyc b/commands/__pycache__/mouse_movement.cpython-311.pyc index bcbcf4b..60d9608 100644 Binary files a/commands/__pycache__/mouse_movement.cpython-311.pyc and b/commands/__pycache__/mouse_movement.cpython-311.pyc differ diff --git a/commands/mouse_movement.py b/commands/mouse_movement.py index a399582..d207503 100644 --- a/commands/mouse_movement.py +++ b/commands/mouse_movement.py @@ -6,6 +6,7 @@ import json import datetime from PIL import ImageGrab +import time DATA_JSON_PATH = "D:\Coding\Discord bots\python-windows-bot\data\data.json" SCREENSHOT_PATH = "D:\Coding\Discord bots\python-windows-bot\data\mouse-ss.png" @@ -47,18 +48,19 @@ async def monitor_mouse_movement(client, config, starting_mouse_position): current_mouse_position = pyautogui.position() if current_mouse_position != previous_mouse_position: + current_time = int(time.time()) print(f"[mouse_movement_LOG] - {last_movement_time} : Mouse Movement Detected.") - message = f"Mouse moved to `{current_mouse_position[0]}`, `{current_mouse_position[1]}`" + message = f"Mouse moved to `{current_mouse_position[0]}`, `{current_mouse_position[1]}` at "+f'' last_movement_time = datetime.datetime.now().strftime("%d-%m-%Y %H:%M:%S") try: screenshot = ImageGrab.grab( - bbox=( - current_mouse_position[0] - 400, - current_mouse_position[1] - 300, - current_mouse_position[0] + 400, - current_mouse_position[1] + 300, - ) + # bbox=( + # current_mouse_position[0] - 400, + # current_mouse_position[1] - 300, + # current_mouse_position[0] + 400, + # current_mouse_position[1] + 300, + # ) ) screenshot.save(SCREENSHOT_PATH) @@ -69,12 +71,12 @@ async def monitor_mouse_movement(client, config, starting_mouse_position): - # Check if image_message is not None and attempt to delete it if it exists - if image_message: - try: - await image_message.delete() - except discord.NotFound: - pass # Message already deleted or not found + # # Check if image_message is not None and attempt to delete it if it exists + # if image_message: + # try: + # await image_message.delete() + # except discord.NotFound: + # pass # Message already deleted or not found image_message = await log_channel.send( message, file=discord.File(SCREENSHOT_PATH) diff --git a/requirements.txt b/requirements.txt index f0e1113..448b4a1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,22 +2,32 @@ aiohttp==3.8.5 aiosignal==1.3.1 async-timeout==4.0.3 attrs==23.1.0 +blinker==1.6.3 charset-normalizer==3.2.0 +click==8.1.7 +colorama==0.4.6 discord.py==2.3.2 +dnspython==2.4.2 EasyProcess==1.1 entrypoint2==1.1 +Flask==3.0.0 frozenlist==1.4.0 idna==3.4 +itsdangerous==2.1.2 +Jinja2==3.1.2 +MarkupSafe==2.1.3 MouseInfo==0.1.3 mss==9.0.1 multidict==6.0.4 -Pillow==10.0.1 +pillow==10.2.0 PyAutoGUI==0.9.54 PyGetWindow==0.0.9 +pymongo==4.5.0 PyMsgBox==1.0.9 pyperclip==1.8.2 PyRect==0.2.0 pyscreenshot==3.1 PyScreeze==0.1.29 pytweening==1.0.7 +Werkzeug==3.0.0 yarl==1.9.2 \ No newline at end of file