Initial commit

This commit is contained in:
Tuxverse
2025-08-25 13:19:00 +10:00
commit c33cc325ce
51 changed files with 8694 additions and 0 deletions

12
scripts/start_bot.py Executable file
View File

@@ -0,0 +1,12 @@
# !/bin/python3
import sys
import os
sys.path.insert(0, os.path.join(os.getcwd()))
sys.path.insert(0, os.path.join(os.getcwd(), "src"))
if __name__ == '__main__':
from bot import _main
_main()

35
scripts/start_debug.py Executable file
View File

@@ -0,0 +1,35 @@
# !/bin/python3
import sys
import os
import tracemalloc
import asyncio
sys.path.insert(0, os.path.join(os.getcwd()))
sys.path.insert(0, os.path.join(os.getcwd(), "src"))
tracemalloc.start()
def loop_exception_handler(loop, context):
print(context)
task: asyncio.Task = context.get('task', None)
if task is not None:
addendum = f"<Task name='{task.get_name()}' stack='{task.get_stack()}'>"
message = context.get('message', '')
context['message'] = ' '.join((message, addendum))
loop.default_exception_handler(context)
def main():
loop = asyncio.get_event_loop()
loop.set_exception_handler(loop_exception_handler)
loop.set_debug(enabled=True)
from bot import _main
_main()
if __name__ == '__main__':
main()