Skip to content

Commit 5630dda

Browse files
committed
Updated package information
1 parent 691efd3 commit 5630dda

File tree

3 files changed

+26
-14
lines changed

3 files changed

+26
-14
lines changed
-204 Bytes
Binary file not shown.

commands/mouse_movement.py

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import json
77
import datetime
88
from PIL import ImageGrab
9+
import time
910

1011
DATA_JSON_PATH = "D:\Coding\Discord bots\python-windows-bot\data\data.json"
1112
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):
4748
current_mouse_position = pyautogui.position()
4849

4950
if current_mouse_position != previous_mouse_position:
51+
current_time = int(time.time())
5052
print(f"[mouse_movement_LOG] - {last_movement_time} : Mouse Movement Detected.")
51-
message = f"Mouse moved to `{current_mouse_position[0]}`, `{current_mouse_position[1]}`"
53+
message = f"Mouse moved to `{current_mouse_position[0]}`, `{current_mouse_position[1]}` at "+f'<t:{current_time}>'
5254
last_movement_time = datetime.datetime.now().strftime("%d-%m-%Y %H:%M:%S")
5355

5456
try:
5557
screenshot = ImageGrab.grab(
56-
bbox=(
57-
current_mouse_position[0] - 400,
58-
current_mouse_position[1] - 300,
59-
current_mouse_position[0] + 400,
60-
current_mouse_position[1] + 300,
61-
)
58+
# bbox=(
59+
# current_mouse_position[0] - 400,
60+
# current_mouse_position[1] - 300,
61+
# current_mouse_position[0] + 400,
62+
# current_mouse_position[1] + 300,
63+
# )
6264
)
6365

6466
screenshot.save(SCREENSHOT_PATH)
@@ -69,12 +71,12 @@ async def monitor_mouse_movement(client, config, starting_mouse_position):
6971

7072

7173

72-
# Check if image_message is not None and attempt to delete it if it exists
73-
if image_message:
74-
try:
75-
await image_message.delete()
76-
except discord.NotFound:
77-
pass # Message already deleted or not found
74+
# # Check if image_message is not None and attempt to delete it if it exists
75+
# if image_message:
76+
# try:
77+
# await image_message.delete()
78+
# except discord.NotFound:
79+
# pass # Message already deleted or not found
7880

7981
image_message = await log_channel.send(
8082
message, file=discord.File(SCREENSHOT_PATH)

requirements.txt

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,32 @@ aiohttp==3.8.5
22
aiosignal==1.3.1
33
async-timeout==4.0.3
44
attrs==23.1.0
5+
blinker==1.6.3
56
charset-normalizer==3.2.0
7+
click==8.1.7
8+
colorama==0.4.6
69
discord.py==2.3.2
10+
dnspython==2.4.2
711
EasyProcess==1.1
812
entrypoint2==1.1
13+
Flask==3.0.0
914
frozenlist==1.4.0
1015
idna==3.4
16+
itsdangerous==2.1.2
17+
Jinja2==3.1.2
18+
MarkupSafe==2.1.3
1119
MouseInfo==0.1.3
1220
mss==9.0.1
1321
multidict==6.0.4
14-
Pillow==10.0.1
22+
pillow==10.2.0
1523
PyAutoGUI==0.9.54
1624
PyGetWindow==0.0.9
25+
pymongo==4.5.0
1726
PyMsgBox==1.0.9
1827
pyperclip==1.8.2
1928
PyRect==0.2.0
2029
pyscreenshot==3.1
2130
PyScreeze==0.1.29
2231
pytweening==1.0.7
32+
Werkzeug==3.0.0
2333
yarl==1.9.2

0 commit comments

Comments
 (0)