mirror of
https://gitlab.com/chicken-riders/RcGcDw.git
synced 2025-02-23 00:24:09 +00:00
Removed 3.7 incompatible type hints, added KeyboardInterrupt detection for exit code 0
This commit is contained in:
parent
e935fe846c
commit
b58bc25043
|
@ -50,7 +50,7 @@ def delete_messages(matching_data: dict):
|
||||||
db_connection.commit()
|
db_connection.commit()
|
||||||
|
|
||||||
|
|
||||||
def redact_messages(ids: Union[List[Union[str, int]], set[Union[int, str]]], entry_type: int, to_censor: dict):
|
def redact_messages(ids, entry_type: int, to_censor: dict): # : Union[List[Union[str, int]], set[Union[int, str]]]
|
||||||
"""Redact past Discord messages
|
"""Redact past Discord messages
|
||||||
|
|
||||||
ids: list of ints
|
ids: list of ints
|
||||||
|
|
|
@ -344,4 +344,8 @@ if TESTING:
|
||||||
|
|
||||||
while 1:
|
while 1:
|
||||||
time.sleep(1.0)
|
time.sleep(1.0)
|
||||||
|
try:
|
||||||
client.scheduler.run()
|
client.scheduler.run()
|
||||||
|
except KeyboardInterrupt:
|
||||||
|
logger.info("Shutting down...")
|
||||||
|
break
|
||||||
|
|
Loading…
Reference in a new issue