Merge pull request #1263 from chennin/patch-1

Fix game_running() doc in PLUGINS.md
This commit is contained in:
Athanasius authored and GitHub committed 2021-08-24 20:24:07 +01:00
commit 5a7ff94eac
1 file changed
+8 -1
+8 -1
View File
@@ -83,9 +83,16 @@ from the original files unless specified as allowed in this section.
`import plug` - For using `plug.show_error()` only.
`from monitor import game_running` - in case a plugin needs to know if we
Use `monitor.game_running()` as follows in case a plugin needs to know if we
think the game is running. *NB: This is a function, and should be called as
such. Using the bare word `game_running` will always be `True`.*
```
from monitor import monitor
...
if monitor.game_running():
...
```
`import timeout_session` - provides a method called `new_session` that creates
a requests.session with a default timeout on all requests. Recommended to