diff options
-rw-r--r-- | arthur/config.py | 2 | ||||
-rw-r--r-- | arthur/exts/grafana/github_team_sync.py | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/arthur/config.py b/arthur/config.py index b1b1f2a..4d31103 100644 --- a/arthur/config.py +++ b/arthur/config.py @@ -21,7 +21,7 @@ class Config( youtube_api_key: pydantic.SecretStr | None = None grafana_url: str = "https://grafana.pydis.wtf" grafana_token: pydantic.SecretStr | None = None - github_token: pydantic.SecretStr + github_token: pydantic.SecretStr | None = None github_org: str = "python-discord" devops_role: int = 409416496733880320 diff --git a/arthur/exts/grafana/github_team_sync.py b/arthur/exts/grafana/github_team_sync.py index 7bc6144..43500cb 100644 --- a/arthur/exts/grafana/github_team_sync.py +++ b/arthur/exts/grafana/github_team_sync.py @@ -157,9 +157,9 @@ class GrafanaGitHubTeamSync(commands.Cog): async def setup(bot: KingArthur) -> None: """Add cog to bot.""" - if CONFIG.grafana_token: + if CONFIG.grafana_token and CONFIG.github_token: await bot.add_cog(GrafanaGitHubTeamSync(bot)) else: - logger.warning("Not loading Grafana Github team sync grafana_token not set") - - await bot.add_cog(GrafanaGitHubTeamSync(bot)) + logger.warning( + "Not loading Grafana Github team sync as grafana_token and/or github_token are not set" + ) |