2025-02-17 16:26:08,920 - INFO - Loaded environment variables from .env
2025-02-18 00:09:50,235 - INFO - Loaded environment variables from .env
2025-02-18 00:09:51,508 - INFO - Database connection pool created.
2025-02-18 00:09:51,823 - INFO - logging in using static token
2025-02-18 00:09:54,326 - INFO - Loaded environment variables from .env
2025-02-18 00:09:55,500 - INFO - Database connection pool created.
2025-02-18 00:09:57,630 - INFO - Loaded environment variables from .env
2025-02-18 00:09:59,757 - INFO - Database connection pool created.
2025-02-18 00:09:59,973 - INFO - Loaded environment variables from .env
2025-02-18 00:10:01,082 - INFO - Database connection pool created.
2025-02-18 00:10:05,273 - INFO - Loaded environment variables from .env
2025-02-18 00:10:06,402 - INFO - Database connection pool created.
2025-02-18 00:10:07,284 - INFO - Shard ID None has connected to Gateway (Session ID: 98509db157a6433f4c890382e115ecc3).
2025-02-18 00:10:39,285 - INFO - [31m[1mWARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.[0m
 * Running on all addresses (0.0.0.0)
 * Running on http://127.0.0.1:5000
 * Running on http://10.2.71.101:5000
2025-02-18 00:10:39,331 - INFO - [33mPress CTRL+C to quit[0m
2025-02-18 00:10:57,572 - INFO - 127.0.0.1 - - [18/Feb/2025 00:10:57] "GET /main HTTP/1.1" 200 -
2025-02-18 00:10:57,923 - INFO - 127.0.0.1 - - [18/Feb/2025 00:10:57] "[33mGET /favicon.ico HTTP/1.1[0m" 404 -
2025-02-18 00:10:59,144 - INFO - 127.0.0.1 - - [18/Feb/2025 00:10:59] "[32mGET /login HTTP/1.1[0m" 302 -
2025-02-18 00:11:15,779 - INFO - 127.0.0.1 - - [18/Feb/2025 00:11:15] "[32mGET /callback?code=1NAa8zBPFT3nRR70n9rNTCpPsWIjhV&guild_id=1193182989211926558&permissions=0 HTTP/1.1[0m" 302 -
2025-02-18 00:11:16,414 - INFO - 127.0.0.1 - - [18/Feb/2025 00:11:16] "GET / HTTP/1.1" 200 -
2025-02-18 00:11:17,123 - INFO - 127.0.0.1 - - [18/Feb/2025 00:11:17] "[33mGET /favicon.ico HTTP/1.1[0m" 404 -
2025-02-18 00:13:59,449 - ERROR - Exception on /guild/1193182989211926558/settings [GET]
Traceback (most recent call last):
  File "C:\Python312\Lib\site-packages\flask\app.py", line 1463, in wsgi_app
    response = self.full_dispatch_request()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\flask\app.py", line 872, in full_dispatch_request
    rv = self.handle_user_exception(e)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\flask\app.py", line 870, in full_dispatch_request
    rv = self.dispatch_request()
         ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\flask\app.py", line 855, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)  # type: ignore[no-any-return]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "h:\Discord_Bot\web\app.py", line 305, in guild_settings
    return render_template("guild_settings.html", user=user, guild=guild_info)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\flask\templating.py", line 149, in render_template
    template = app.jinja_env.get_or_select_template(template_name_or_list)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\jinja2\environment.py", line 1081, in get_or_select_template
    return self.get_template(template_name_or_list, parent, globals)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\jinja2\environment.py", line 1010, in get_template
    return self._load_template(name, globals)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\jinja2\environment.py", line 969, in _load_template
    template = self.loader.load(self, name, self.make_globals(globals))
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\jinja2\loaders.py", line 137, in load
    code = environment.compile(source, name, filename)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\jinja2\environment.py", line 768, in compile
    self.handle_exception(source=source_hint)
  File "C:\Python312\Lib\site-packages\jinja2\environment.py", line 936, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "h:\Discord_Bot\web\templates\guild_settings.html", line 14, in template
    <img src="{{ guild.icon ? 'https://cdn.discordapp.com/icons/' + guild.id + '/' + guild.icon + '.png' : '/static/default_guild_icon.png' }}"
    ^^^^^^^^^^^^^^^^^^^^^^^^^
jinja2.exceptions.TemplateSyntaxError: unexpected char '?' at 449
2025-02-18 00:14:00,215 - INFO - 127.0.0.1 - - [18/Feb/2025 00:14:00] "[35m[1mGET /guild/1193182989211926558/settings HTTP/1.1[0m" 500 -
2025-02-18 00:14:49,675 - INFO - Loaded environment variables from .env
2025-02-18 00:14:50,854 - INFO - Database connection pool created.
2025-02-18 00:14:51,186 - INFO - logging in using static token
2025-02-18 00:14:54,529 - INFO - Loaded environment variables from .env
2025-02-18 00:14:55,700 - INFO - Database connection pool created.
2025-02-18 00:14:55,888 - INFO - Loaded environment variables from .env
2025-02-18 00:14:57,165 - INFO - Database connection pool created.
2025-02-18 00:15:03,092 - INFO - Loaded environment variables from .env
2025-02-18 00:15:04,292 - INFO - Database connection pool created.
2025-02-18 00:15:05,292 - INFO - Loaded environment variables from .env
2025-02-18 00:15:06,618 - INFO - Database connection pool created.
2025-02-18 00:15:07,459 - INFO - Shard ID None has connected to Gateway (Session ID: 99312eb2b01111152db88ab221503bcd).
2025-02-18 00:15:28,383 - INFO - Executed query: SELECT * FROM economy WHERE ID = %s with params: (601579326714019840,)
2025-02-18 00:15:28,698 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-02-18 00:15:28,967 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE ID = VALUES(ID), XP = VALUES(XP), LEVEL = VALUES(LEVEL) with params: (601579326714019840, 804, 131)
2025-02-18 00:15:29,099 - INFO - Insert completed with query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE ID = VALUES(ID), XP = VALUES(XP), LEVEL = VALUES(LEVEL).
2025-02-18 00:15:29,360 - INFO - Executed query: SELECT * FROM custom_commands WHERE GUILDID = %s with params: ('1193182989211926558',)
2025-02-18 00:15:34,354 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-02-18 00:15:34,658 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE ID = VALUES(ID), XP = VALUES(XP), LEVEL = VALUES(LEVEL) with params: (601579326714019840, 846, 131)
2025-02-18 00:15:35,000 - INFO - Insert completed with query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE ID = VALUES(ID), XP = VALUES(XP), LEVEL = VALUES(LEVEL).
2025-02-18 00:15:35,264 - INFO - Executed query: SELECT * FROM custom_commands WHERE GUILDID = %s with params: ('1193182989211926558',)
2025-02-18 00:23:15,116 - INFO - [31m[1mWARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.[0m
 * Running on all addresses (0.0.0.0)
 * Running on http://127.0.0.1:5000
 * Running on http://10.2.71.101:5000
2025-02-18 00:23:15,184 - INFO - [33mPress CTRL+C to quit[0m
2025-02-18 00:23:15,364 - INFO -  * Restarting with stat
2025-02-18 00:23:57,029 - INFO - Loaded environment variables from .env
2025-02-18 00:23:58,097 - INFO - Database connection pool created.
2025-02-18 00:27:05,253 - INFO - Loaded environment variables from .env
2025-02-18 00:27:06,369 - INFO - Database connection pool created.
2025-02-18 00:27:07,690 - INFO - [31m[1mWARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.[0m
 * Running on all addresses (0.0.0.0)
 * Running on http://127.0.0.1:5000
 * Running on http://10.2.71.101:5000
2025-02-18 00:27:07,728 - INFO - [33mPress CTRL+C to quit[0m
2025-02-18 00:27:07,889 - INFO -  * Restarting with stat
2025-02-18 00:27:38,810 - INFO - Loaded environment variables from .env
2025-02-18 00:27:39,985 - INFO - Database connection pool created.
2025-02-18 00:27:41,103 - WARNING -  * Debugger is active!
2025-02-18 00:27:42,642 - INFO -  * Debugger PIN: 140-880-646
2025-02-18 00:27:49,253 - INFO - 127.0.0.1 - - [18/Feb/2025 00:27:49] "GET / HTTP/1.1" 200 -
2025-02-18 00:27:49,437 - INFO - 127.0.0.1 - - [18/Feb/2025 00:27:49] "[32mGET / HTTP/1.1[0m" 302 -
2025-02-18 00:27:49,993 - INFO - 127.0.0.1 - - [18/Feb/2025 00:27:49] "GET /main HTTP/1.1" 200 -
2025-02-18 00:27:50,355 - INFO - 127.0.0.1 - - [18/Feb/2025 00:27:50] "[35m[1mGET /guild/1193182989211926558/settings HTTP/1.1[0m" 500 -
2025-02-18 00:27:51,537 - INFO - 127.0.0.1 - - [18/Feb/2025 00:27:51] "[32mGET /login HTTP/1.1[0m" 302 -
2025-02-18 00:28:19,573 - INFO - 127.0.0.1 - - [18/Feb/2025 00:28:19] "[32mGET /callback?code=iC2CzSoUy1wDBmihtmo29yqSnSCngG&guild_id=1193182989211926558&permissions=0 HTTP/1.1[0m" 302 -
2025-02-18 00:28:19,765 - INFO - 127.0.0.1 - - [18/Feb/2025 00:28:19] "GET / HTTP/1.1" 200 -
2025-02-18 00:28:28,539 - INFO - 127.0.0.1 - - [18/Feb/2025 00:28:28] "[35m[1mGET /guild/1193182989211926558/settings HTTP/1.1[0m" 500 -
2025-02-18 00:28:29,067 - INFO - 127.0.0.1 - - [18/Feb/2025 00:28:29] "GET /guild/1193182989211926558/settings?__debugger__=yes&cmd=resource&f=debugger.js HTTP/1.1" 200 -
2025-02-18 00:28:29,067 - INFO - 127.0.0.1 - - [18/Feb/2025 00:28:29] "GET /guild/1193182989211926558/settings?__debugger__=yes&cmd=resource&f=style.css HTTP/1.1" 200 -
2025-02-18 00:28:29,210 - INFO - 127.0.0.1 - - [18/Feb/2025 00:28:29] "GET /guild/1193182989211926558/settings?__debugger__=yes&cmd=resource&f=console.png HTTP/1.1" 200 -
2025-02-18 00:28:29,283 - INFO - 127.0.0.1 - - [18/Feb/2025 00:28:29] "[36mGET /guild/1193182989211926558/settings?__debugger__=yes&cmd=resource&f=console.png HTTP/1.1[0m" 304 -
2025-02-18 00:28:35,271 - INFO - 127.0.0.1 - - [18/Feb/2025 00:28:35] "[35m[1mGET /guild/1158025725060862093/settings HTTP/1.1[0m" 500 -
2025-02-18 00:28:35,384 - INFO - 127.0.0.1 - - [18/Feb/2025 00:28:35] "GET /guild/1158025725060862093/settings?__debugger__=yes&cmd=resource&f=style.css HTTP/1.1" 200 -
2025-02-18 00:28:35,396 - INFO - 127.0.0.1 - - [18/Feb/2025 00:28:35] "GET /guild/1158025725060862093/settings?__debugger__=yes&cmd=resource&f=debugger.js HTTP/1.1" 200 -
2025-02-18 00:28:35,494 - INFO - 127.0.0.1 - - [18/Feb/2025 00:28:35] "GET /guild/1158025725060862093/settings?__debugger__=yes&cmd=resource&f=console.png HTTP/1.1" 200 -
2025-02-18 00:28:35,552 - INFO - 127.0.0.1 - - [18/Feb/2025 00:28:35] "[36mGET /guild/1158025725060862093/settings?__debugger__=yes&cmd=resource&f=console.png HTTP/1.1[0m" 304 -
2025-02-18 00:28:38,488 - INFO - Executed query: SELECT BANK, WALLET FROM economy WHERE ID = %s with params: ('601579326714019840',)
2025-02-18 00:28:39,009 - INFO - 127.0.0.1 - - [18/Feb/2025 00:28:39] "GET /wallet HTTP/1.1" 200 -
2025-02-18 00:28:45,186 - INFO - Executed query: SELECT * FROM transactions WHERE USERID = %s ORDER BY TIME ASC with params: ('601579326714019840',)
2025-02-18 00:28:45,737 - INFO - 127.0.0.1 - - [18/Feb/2025 00:28:45] "GET /transactions HTTP/1.1" 200 -
2025-02-18 00:29:00,444 - INFO - Executed query: SELECT BANK, WALLET FROM economy WHERE ID = %s with params: ('601579326714019840',)
2025-02-18 00:29:00,598 - INFO - 127.0.0.1 - - [18/Feb/2025 00:29:00] "GET /wallet HTTP/1.1" 200 -
2025-02-18 00:29:02,084 - INFO - 127.0.0.1 - - [18/Feb/2025 00:29:02] "GET / HTTP/1.1" 200 -
2025-02-18 00:29:03,580 - INFO - Executed query: SELECT * FROM transactions WHERE USERID = %s ORDER BY TIME ASC with params: ('601579326714019840',)
2025-02-18 00:29:03,818 - INFO - 127.0.0.1 - - [18/Feb/2025 00:29:03] "GET /transactions HTTP/1.1" 200 -
2025-02-18 00:29:09,463 - INFO - Executed query: SELECT BANK, WALLET FROM economy WHERE ID = %s with params: ('601579326714019840',)
2025-02-18 00:29:09,673 - INFO - 127.0.0.1 - - [18/Feb/2025 00:29:09] "GET /wallet HTTP/1.1" 200 -
2025-02-18 00:29:10,817 - INFO - 127.0.0.1 - - [18/Feb/2025 00:29:10] "GET / HTTP/1.1" 200 -
2025-02-18 00:30:49,125 - INFO -  * Detected change in 'h:\\Discord_Bot\\bot.py', reloading
2025-02-18 00:30:49,299 - ERROR - Task exception was never retrieved
future: <Task finished name='Task-1' coro=<main() done, defined at h:\Discord_Bot\bot.py:41> exception=SystemExit(3)>
Traceback (most recent call last):
  File "h:\Discord_Bot\bot.py", line 52, in <module>
    asyncio.run(main())
  File "C:\Python312\Lib\asyncio\runners.py", line 193, in run
    with Runner(debug=debug, loop_factory=loop_factory) as runner:
  File "C:\Python312\Lib\asyncio\runners.py", line 62, in __exit__
    self.close()
  File "C:\Python312\Lib\asyncio\runners.py", line 70, in close
    _cancel_all_tasks(loop)
  File "C:\Python312\Lib\asyncio\runners.py", line 205, in _cancel_all_tasks
    loop.run_until_complete(tasks.gather(*to_cancel, return_exceptions=True))
  File "C:\Python312\Lib\asyncio\base_events.py", line 674, in run_until_complete
    self.run_forever()
  File "C:\Python312\Lib\asyncio\windows_events.py", line 322, in run_forever
    super().run_forever()
  File "C:\Python312\Lib\asyncio\base_events.py", line 641, in run_forever
    self._run_once()
  File "C:\Python312\Lib\asyncio\base_events.py", line 1987, in _run_once
    handle._run()
  File "C:\Python312\Lib\asyncio\events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "h:\Discord_Bot\bot.py", line 46, in main
    await asyncio.gather(run_web(), client.start(token))
  File "C:\Python312\Lib\asyncio\runners.py", line 194, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\asyncio\runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\asyncio\base_events.py", line 674, in run_until_complete
    self.run_forever()
  File "C:\Python312\Lib\asyncio\windows_events.py", line 322, in run_forever
    super().run_forever()
  File "C:\Python312\Lib\asyncio\base_events.py", line 641, in run_forever
    self._run_once()
  File "C:\Python312\Lib\asyncio\base_events.py", line 1987, in _run_once
    handle._run()
  File "C:\Python312\Lib\asyncio\events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "h:\Discord_Bot\bot.py", line 11, in run_web
    app.run(debug=True, host="0.0.0.0", port=5000)
  File "C:\Python312\Lib\site-packages\flask\app.py", line 615, in run
    run_simple(t.cast(str, host), port, self, **options)
  File "C:\Python312\Lib\site-packages\werkzeug\serving.py", line 1099, in run_simple
    run_with_reloader(
  File "C:\Python312\Lib\site-packages\werkzeug\_reloader.py", line 454, in run_with_reloader
    reloader.run()
  File "C:\Python312\Lib\site-packages\werkzeug\_reloader.py", line 255, in run
    self.run_step()
  File "C:\Python312\Lib\site-packages\werkzeug\_reloader.py", line 308, in run_step
    self.trigger_reload(name)
  File "C:\Python312\Lib\site-packages\werkzeug\_reloader.py", line 280, in trigger_reload
    sys.exit(3)
SystemExit: 3
2025-02-18 00:30:50,416 - INFO -  * Restarting with stat
2025-02-18 00:31:21,508 - INFO - Loaded environment variables from .env
2025-02-18 00:31:22,607 - INFO - Database connection pool created.
2025-02-18 00:31:23,196 - ERROR - Task exception was never retrieved
future: <Task finished name='Task-1' coro=<main() done, defined at h:\Discord_Bot\bot.py:41> exception=SystemExit(1)>
Traceback (most recent call last):
  File "h:\Discord_Bot\bot.py", line 52, in <module>
    if __name__ == "__main__":
        ^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\asyncio\runners.py", line 193, in run
    with Runner(debug=debug, loop_factory=loop_factory) as runner:
  File "C:\Python312\Lib\asyncio\runners.py", line 62, in __exit__
    self.close()
  File "C:\Python312\Lib\asyncio\runners.py", line 70, in close
    _cancel_all_tasks(loop)
  File "C:\Python312\Lib\asyncio\runners.py", line 205, in _cancel_all_tasks
    loop.run_until_complete(tasks.gather(*to_cancel, return_exceptions=True))
  File "C:\Python312\Lib\asyncio\base_events.py", line 674, in run_until_complete
    self.run_forever()
  File "C:\Python312\Lib\asyncio\windows_events.py", line 322, in run_forever
    super().run_forever()
  File "C:\Python312\Lib\asyncio\base_events.py", line 641, in run_forever
    self._run_once()
  File "C:\Python312\Lib\asyncio\base_events.py", line 1987, in _run_once
    handle._run()
  File "C:\Python312\Lib\asyncio\events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "h:\Discord_Bot\bot.py", line 46, in main
    threading.Thread(target=run_flask).start()
  File "C:\Python312\Lib\asyncio\runners.py", line 194, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\asyncio\runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\asyncio\base_events.py", line 674, in run_until_complete
    self.run_forever()
  File "C:\Python312\Lib\asyncio\windows_events.py", line 322, in run_forever
    super().run_forever()
  File "C:\Python312\Lib\asyncio\base_events.py", line 641, in run_forever
    self._run_once()
  File "C:\Python312\Lib\asyncio\base_events.py", line 1987, in _run_once
    handle._run()
  File "C:\Python312\Lib\asyncio\events.py", line 88, in _run
    self._context.run(self._callback, *self._args)
  File "h:\Discord_Bot\bot.py", line 11, in run_web
    app.run(debug=True, host="0.0.0.0", port=5000)
  File "C:\Python312\Lib\site-packages\flask\app.py", line 615, in run
    run_simple(t.cast(str, host), port, self, **options)
  File "C:\Python312\Lib\site-packages\werkzeug\serving.py", line 1099, in run_simple
    run_with_reloader(
  File "C:\Python312\Lib\site-packages\werkzeug\_reloader.py", line 456, in run_with_reloader
    sys.exit(reloader.restart_with_reloader())
SystemExit: 1
2025-02-18 00:32:28,094 - INFO - Loaded environment variables from .env
2025-02-18 00:32:29,183 - INFO - Database connection pool created.
2025-02-18 00:32:29,516 - INFO - logging in using static token
2025-02-18 00:32:33,191 - INFO - Loaded environment variables from .env
2025-02-18 00:32:34,523 - INFO - Database connection pool created.
2025-02-18 00:32:34,747 - INFO - Loaded environment variables from .env
2025-02-18 00:32:35,875 - INFO - Database connection pool created.
2025-02-18 00:32:42,070 - INFO - Loaded environment variables from .env
2025-02-18 00:32:43,291 - INFO - Database connection pool created.
2025-02-18 00:32:44,569 - INFO - Loaded environment variables from .env
2025-02-18 00:32:45,747 - INFO - Database connection pool created.
2025-02-18 00:32:46,534 - INFO - Shard ID None has connected to Gateway (Session ID: f5b6391616fe1cd902bab5eaede7b1e3).
2025-02-18 00:35:07,214 - INFO - Loaded environment variables from .env
2025-02-18 00:35:08,317 - INFO - Database connection pool created.
2025-02-18 00:35:08,595 - INFO - logging in using static token
2025-02-18 00:35:12,030 - INFO - Loaded environment variables from .env
2025-02-18 00:35:13,232 - INFO - Database connection pool created.
2025-02-18 00:35:13,475 - INFO - Loaded environment variables from .env
2025-02-18 00:35:14,506 - INFO - Database connection pool created.
2025-02-18 00:35:20,276 - INFO - Loaded environment variables from .env
2025-02-18 00:35:21,550 - INFO - Database connection pool created.
2025-02-18 00:35:22,874 - INFO - Loaded environment variables from .env
2025-02-18 00:35:23,990 - INFO - Database connection pool created.
2025-02-18 00:35:24,734 - INFO - Shard ID None has connected to Gateway (Session ID: eab1413949391e81976bde3e246c9aeb).
2025-02-18 00:36:31,294 - INFO - Loaded environment variables from .env
2025-02-18 00:36:32,344 - INFO - Database connection pool created.
2025-02-18 00:36:32,764 - INFO - logging in using static token
2025-02-18 00:36:34,091 - INFO - [31m[1mWARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.[0m
 * Running on all addresses (0.0.0.0)
 * Running on http://127.0.0.1:5000
 * Running on http://10.2.71.101:5000
2025-02-18 00:36:34,135 - INFO - [33mPress CTRL+C to quit[0m
2025-02-18 00:36:36,601 - INFO - Loaded environment variables from .env
2025-02-18 00:36:37,621 - INFO - Database connection pool created.
2025-02-18 00:36:37,873 - INFO - Loaded environment variables from .env
2025-02-18 00:36:38,969 - INFO - Database connection pool created.
2025-02-18 00:36:44,499 - INFO - Loaded environment variables from .env
2025-02-18 00:36:45,605 - INFO - Database connection pool created.
2025-02-18 00:36:46,553 - INFO - Loaded environment variables from .env
2025-02-18 00:36:47,609 - INFO - Database connection pool created.
2025-02-18 00:36:48,293 - INFO - Shard ID None has connected to Gateway (Session ID: 7f70f0f59e709bcc61e8c57a85b8860d).
2025-02-18 00:38:09,911 - INFO - Loaded environment variables from .env
2025-02-18 00:38:11,012 - INFO - Database connection pool created.
2025-02-18 00:38:11,313 - INFO - logging in using static token
2025-02-18 00:38:11,784 - INFO - [31m[1mWARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.[0m
 * Running on all addresses (0.0.0.0)
 * Running on http://127.0.0.1:5000
 * Running on http://10.2.71.101:5000
2025-02-18 00:38:11,845 - INFO - [33mPress CTRL+C to quit[0m
2025-02-18 00:38:14,661 - INFO - Loaded environment variables from .env
2025-02-18 00:38:15,754 - INFO - Database connection pool created.
2025-02-18 00:38:15,967 - INFO - Loaded environment variables from .env
2025-02-18 00:38:17,046 - INFO - Database connection pool created.
2025-02-18 00:38:22,379 - INFO - Loaded environment variables from .env
2025-02-18 00:38:23,450 - INFO - Database connection pool created.
2025-02-18 00:38:24,355 - INFO - Loaded environment variables from .env
2025-02-18 00:38:25,472 - INFO - Database connection pool created.
2025-02-18 00:38:26,244 - INFO - Shard ID None has connected to Gateway (Session ID: 4caa51a8a7e97e5f8d3fee605ac913f4).
2025-02-18 00:38:41,430 - INFO - 127.0.0.1 - - [18/Feb/2025 00:38:41] "[32mGET / HTTP/1.1[0m" 302 -
2025-02-18 00:38:42,037 - INFO - 127.0.0.1 - - [18/Feb/2025 00:38:42] "GET /main HTTP/1.1" 200 -
2025-02-18 00:38:43,567 - INFO - 127.0.0.1 - - [18/Feb/2025 00:38:43] "[32mGET /login HTTP/1.1[0m" 302 -
2025-02-18 00:39:55,523 - INFO - 127.0.0.1 - - [18/Feb/2025 00:39:55] "[32mGET /callback?code=Xeeh0hYQ7IKHt82mwOHtfVzJLji0Br&guild_id=1013546682249646110&permissions=0 HTTP/1.1[0m" 302 -
2025-02-18 00:39:56,107 - INFO - 127.0.0.1 - - [18/Feb/2025 00:39:56] "GET / HTTP/1.1" 200 -
2025-02-18 00:40:01,639 - ERROR - Exception on /guild/1193182989211926558/settings [GET]
Traceback (most recent call last):
  File "C:\Python312\Lib\site-packages\flask\app.py", line 1463, in wsgi_app
    response = self.full_dispatch_request()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\flask\app.py", line 872, in full_dispatch_request
    rv = self.handle_user_exception(e)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\flask\app.py", line 870, in full_dispatch_request
    rv = self.dispatch_request()
         ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\flask\app.py", line 855, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)  # type: ignore[no-any-return]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "h:\Discord_Bot\web\app.py", line 305, in guild_settings
    return render_template("guild_settings.html", user=user, guild=guild_info)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\flask\templating.py", line 149, in render_template
    template = app.jinja_env.get_or_select_template(template_name_or_list)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\jinja2\environment.py", line 1081, in get_or_select_template
    return self.get_template(template_name_or_list, parent, globals)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\jinja2\environment.py", line 1010, in get_template
    return self._load_template(name, globals)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\jinja2\environment.py", line 969, in _load_template
    template = self.loader.load(self, name, self.make_globals(globals))
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\jinja2\loaders.py", line 137, in load
    code = environment.compile(source, name, filename)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\jinja2\environment.py", line 768, in compile
    self.handle_exception(source=source_hint)
  File "C:\Python312\Lib\site-packages\jinja2\environment.py", line 936, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "h:\Discord_Bot\web\templates\guild_settings.html", line 14, in template
    <img src="{{ guild.icon ? 'https://cdn.discordapp.com/icons/' + guild.id + '/' + guild.icon + '.png' : '/static/default_guild_icon.png' }}"
    ^^^^^^^^^^^^^^^^^^^^^^^^^
jinja2.exceptions.TemplateSyntaxError: unexpected char '?' at 449
2025-02-18 00:40:02,428 - INFO - 127.0.0.1 - - [18/Feb/2025 00:40:02] "[35m[1mGET /guild/1193182989211926558/settings HTTP/1.1[0m" 500 -
2025-02-18 00:40:06,394 - ERROR - Exception on /guild/1158025725060862093/settings [GET]
Traceback (most recent call last):
  File "C:\Python312\Lib\site-packages\flask\app.py", line 1463, in wsgi_app
    response = self.full_dispatch_request()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\flask\app.py", line 872, in full_dispatch_request
    rv = self.handle_user_exception(e)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\flask\app.py", line 870, in full_dispatch_request
    rv = self.dispatch_request()
         ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\flask\app.py", line 855, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)  # type: ignore[no-any-return]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "h:\Discord_Bot\web\app.py", line 305, in guild_settings
    return render_template("guild_settings.html", user=user, guild=guild_info)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\flask\templating.py", line 149, in render_template
    template = app.jinja_env.get_or_select_template(template_name_or_list)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\jinja2\environment.py", line 1081, in get_or_select_template
    return self.get_template(template_name_or_list, parent, globals)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\jinja2\environment.py", line 1010, in get_template
    return self._load_template(name, globals)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\jinja2\environment.py", line 969, in _load_template
    template = self.loader.load(self, name, self.make_globals(globals))
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\jinja2\loaders.py", line 137, in load
    code = environment.compile(source, name, filename)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\jinja2\environment.py", line 768, in compile
    self.handle_exception(source=source_hint)
  File "C:\Python312\Lib\site-packages\jinja2\environment.py", line 936, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "h:\Discord_Bot\web\templates\guild_settings.html", line 14, in template
    <img src="{{ guild.icon ? 'https://cdn.discordapp.com/icons/' + guild.id + '/' + guild.icon + '.png' : '/static/default_guild_icon.png' }}"
    ^^^^^^^^^^^^^^^^^^^^^^^^^
jinja2.exceptions.TemplateSyntaxError: unexpected char '?' at 449
2025-02-18 00:40:06,699 - INFO - 127.0.0.1 - - [18/Feb/2025 00:40:06] "[35m[1mGET /guild/1158025725060862093/settings HTTP/1.1[0m" 500 -
2025-02-18 00:40:09,668 - INFO - Executed query: SELECT BANK, WALLET FROM economy WHERE ID = %s with params: ('601579326714019840',)
2025-02-18 00:40:10,240 - INFO - 127.0.0.1 - - [18/Feb/2025 00:40:10] "GET /wallet HTTP/1.1" 200 -
2025-02-18 00:40:12,080 - INFO - 127.0.0.1 - - [18/Feb/2025 00:40:12] "GET / HTTP/1.1" 200 -
2025-02-18 00:40:14,702 - INFO - Executed query: SELECT * FROM transactions WHERE USERID = %s ORDER BY TIME ASC with params: ('601579326714019840',)
2025-02-18 00:40:15,310 - INFO - 127.0.0.1 - - [18/Feb/2025 00:40:15] "GET /transactions HTTP/1.1" 200 -
2025-02-18 00:40:31,340 - INFO - Executed query: SELECT * FROM economy WHERE ID = %s with params: (601579326714019840,)
2025-02-18 00:40:31,636 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-02-18 00:40:31,875 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE ID = VALUES(ID), XP = VALUES(XP), LEVEL = VALUES(LEVEL) with params: (601579326714019840, 896, 131)
2025-02-18 00:40:32,596 - INFO - Insert completed with query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE ID = VALUES(ID), XP = VALUES(XP), LEVEL = VALUES(LEVEL).
2025-02-18 00:40:32,807 - INFO - Executed query: SELECT * FROM custom_commands WHERE GUILDID = %s with params: ('1193182989211926558',)
2025-02-18 00:40:45,160 - INFO - Executed query: SELECT * FROM economy WHERE ID = %s with params: (601579326714019840,)
2025-02-18 00:40:45,406 - INFO - Executed query: SELECT * FROM economy WHERE ID = %s with params: (601579326714019840,)
2025-02-18 00:40:45,701 - INFO - Executed query: INSERT INTO economy (ID, WALLET, BANK) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE ID = VALUES(ID), WALLET = VALUES(WALLET), BANK = VALUES(BANK) with params: (601579326714019840, 1000, 6839)
2025-02-18 00:40:45,812 - INFO - Insert completed with query: INSERT INTO economy (ID, WALLET, BANK) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE ID = VALUES(ID), WALLET = VALUES(WALLET), BANK = VALUES(BANK).
2025-02-18 00:40:46,004 - INFO - Executed query: SELECT XP, LEVEL FROM users WHERE ID = %s with params: (601579326714019840,)
2025-02-18 00:40:46,354 - INFO - Executed query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE ID = VALUES(ID), XP = VALUES(XP), LEVEL = VALUES(LEVEL) with params: (601579326714019840, 946, 131)
2025-02-18 00:40:46,462 - INFO - Insert completed with query: INSERT INTO users (ID, XP, LEVEL) VALUES (%s, %s, %s) ON DUPLICATE KEY UPDATE ID = VALUES(ID), XP = VALUES(XP), LEVEL = VALUES(LEVEL).
2025-02-18 00:40:46,648 - INFO - Executed query: SELECT * FROM custom_commands WHERE GUILDID = %s with params: ('1193182989211926558',)
2025-02-18 00:40:49,085 - INFO - Executed query: SELECT BANK, WALLET FROM economy WHERE ID = %s with params: ('601579326714019840',)
2025-02-18 00:40:49,181 - INFO - 127.0.0.1 - - [18/Feb/2025 00:40:49] "GET /wallet HTTP/1.1" 200 -
2025-02-18 00:40:51,506 - INFO - 127.0.0.1 - - [18/Feb/2025 00:40:51] "GET / HTTP/1.1" 200 -
