Skip to content

Commit

Permalink
Cogs clean up (#7)
Browse files Browse the repository at this point in the history
* feat: clean cogs, migrate to poetry

* chore: update deps for docker
  • Loading branch information
MagneticNeedle authored Sep 17, 2023
1 parent 3341115 commit 4ad0fae
Show file tree
Hide file tree
Showing 9 changed files with 1,688 additions and 554 deletions.
32 changes: 22 additions & 10 deletions bot/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,26 @@

load_dotenv()

try:
uvicorn.run(
"bot.dashboard.dashboard:app", host="0.0.0.0", port=5000, log_level="info"
)
except KeyboardInterrupt as e:
logger.info(f"Exiting app...")
exit(0)

except BaseException as e:
logger.critical(f"Error {e} happened when stating the bot ")
raise
def main():
logger.info("Starting bot...")

try:
uvicorn.run(
"bot.dashboard.dashboard:app",
host="0.0.0.0",
port=5000,
log_level="info",
reload=True
)
except KeyboardInterrupt as e:
logger.info(f"Exiting app...")
exit(0)

except BaseException as e:
logger.critical(f"Error {e} happened when stating the bot ")
raise


if __name__ == '__main__':
main()
2 changes: 1 addition & 1 deletion bot/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def __init__(self, **options):
self.cogs_list = [
f"bot.cogs.{i.stem}"
for i in (project_base_path / "cogs").glob("*.py")
if i.name != "__init__.py"
if i.stem not in ["__init__", "cog_base"]
]
self.update_config.start()

Expand Down
291 changes: 0 additions & 291 deletions bot/cogs/add_to_todo.py

This file was deleted.

Loading

0 comments on commit 4ad0fae

Please sign in to comment.