aboutsummaryrefslogtreecommitdiffstats
path: root/arthur/exts/grafana/github_team_sync.py
diff options
context:
space:
mode:
authorGravatar Chris Lovering <[email protected]>2024-08-19 12:07:19 +0100
committerGravatar Chris Lovering <[email protected]>2024-08-19 12:07:19 +0100
commit4300896cc205a72ea2973a670186f4029b6bfde3 (patch)
treed6c7f173034c73fb2c2aecadc8057ee8db7f12ac /arthur/exts/grafana/github_team_sync.py
parentAllow loading the bot without a cloudflare_token set (diff)
Allow loading the bot without a grafana_token set
Diffstat (limited to 'arthur/exts/grafana/github_team_sync.py')
-rw-r--r--arthur/exts/grafana/github_team_sync.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/arthur/exts/grafana/github_team_sync.py b/arthur/exts/grafana/github_team_sync.py
index 6e77a55..7bc6144 100644
--- a/arthur/exts/grafana/github_team_sync.py
+++ b/arthur/exts/grafana/github_team_sync.py
@@ -4,6 +4,7 @@ from discord.ext import commands, tasks
from arthur.apis import github, grafana
from arthur.bot import KingArthur
+from arthur.config import CONFIG
from arthur.log import logger
from . import MissingMembers, SyncFigures
@@ -156,4 +157,9 @@ class GrafanaGitHubTeamSync(commands.Cog):
async def setup(bot: KingArthur) -> None:
"""Add cog to bot."""
+ if CONFIG.grafana_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))