From 645bfef0b6e4d3cd84be1d1aafb16c7cb7c63e0b Mon Sep 17 00:00:00 2001 From: Phxntxm Date: Thu, 11 May 2017 19:43:43 -0500 Subject: [PATCH] Use the actual application info to figure out owner --- bot.py | 3 +++ cogs/utils/checks.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/bot.py b/bot.py index a5fc66c..303e18b 100644 --- a/bot.py +++ b/bot.py @@ -28,6 +28,9 @@ async def on_ready(): if not hasattr(bot, 'uptime'): bot.uptime = pendulum.utcnow() + if not hasattr(bot, 'owner'): + appinfo = await bot.application_info() + bot.owner = appinfo.owner await utils.db_check() diff --git a/cogs/utils/checks.py b/cogs/utils/checks.py index 81dcc35..f953c29 100644 --- a/cogs/utils/checks.py +++ b/cogs/utils/checks.py @@ -63,7 +63,7 @@ async def db_check(): def is_owner(ctx): - return ctx.message.author.id in config.owner_ids + return ctx.bot.owner.id == ctx.message.author.id def should_ignore(message):