Compare commits
2 Commits
a1312a0af6
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 98b0e16859 | |||
| d0b5497725 |
16
discord_test_send.py
Normal file
16
discord_test_send.py
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
import ujson
|
||||||
|
# Reload discord module fresh and run the forced debug send once.
|
||||||
|
try:
|
||||||
|
# ensure we use latest module on device
|
||||||
|
import sys
|
||||||
|
if "scripts.discord_webhook" in sys.modules:
|
||||||
|
del sys.modules["scripts.discord_webhook"]
|
||||||
|
import scripts.discord_webhook as d
|
||||||
|
# load config.json to populate webhook URL
|
||||||
|
with open("config.json", "r") as f:
|
||||||
|
cfg = ujson.load(f)
|
||||||
|
d.set_config(cfg)
|
||||||
|
print("Running debug_force_send() — may trigger ENOMEM, run once only")
|
||||||
|
d.debug_force_send("memory test")
|
||||||
|
except Exception as e:
|
||||||
|
print("test_send error:", e)
|
||||||
Reference in New Issue
Block a user