Skip to content

Commit 6ebfffe

Browse files
committed
Support team accounts by adding OWNERS config var
1 parent fd6dde5 commit 6ebfffe

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
# v2.18.1
8+
9+
Un-deprecated the `OWNERS` config variable to support discord developer team accounts.
710

811
# v2.18.0
912

bot.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
SOFTWARE.
2323
"""
2424

25-
__version__ = '2.18.0'
25+
__version__ = '2.18.1'
2626

2727
import asyncio
2828
import logging
@@ -223,6 +223,11 @@ def run(self, *args, **kwargs):
223223
self.loop.close()
224224
logger.info(error(' - Shutting down bot - '))
225225

226+
async def is_owner(self, user):
227+
raw = str(self.config.get('owners', '0')).split(',')
228+
allowed = {int(x) for x in raw}
229+
return await super().is_owner(user) or user.id in allowed
230+
226231
@property
227232
def log_channel(self):
228233
channel_id = self.config.get('log_channel_id')

0 commit comments

Comments
 (0)