aboutsummaryrefslogtreecommitdiffstats
path: root/arthur/bot.py
diff options
context:
space:
mode:
authorGravatar Joe Banks <[email protected]>2021-08-20 02:09:29 +0100
committerGravatar Joe Banks <[email protected]>2021-08-20 02:09:29 +0100
commit6a9abbbdf4eb9e6f41d8e463524620650a6cc42a (patch)
treee776455b1b9bb81282403d10db2db51e104b56a2 /arthur/bot.py
parentEdit message using direct message instead of helper method (diff)
Add Jishaku
Diffstat (limited to 'arthur/bot.py')
-rw-r--r--arthur/bot.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/arthur/bot.py b/arthur/bot.py
index ffcb476..05da078 100644
--- a/arthur/bot.py
+++ b/arthur/bot.py
@@ -2,7 +2,7 @@
from pathlib import Path
from typing import Any, Union
-from discord import Interaction
+from discord import Interaction, Member, User
from discord.ext import commands
from discord.ext.commands import Bot
from kubernetes_asyncio import config
@@ -69,3 +69,13 @@ class KingArthur(Bot):
logger.info(
f"Loaded extension <magenta>{path.stem}</> " f"from <magenta>{path.parent}</>"
)
+
+ logger.info("Loading <red>jishaku</red>")
+ self.load_extension("jishaku")
+ logger.info("Loaded <red>jishaku</red>")
+
+ async def is_owner(self, user: Union[User, Member]) -> bool:
+ if not user.guild_id:
+ return False
+
+ return CONFIG.devops_role in [r.id for r in user.roles]