fix(moderation): changed self.servers to self.client.servers
All checks were successful
Pylint / Pylint (push) Successful in 50s

This commit is contained in:
Seaswimmer 2023-09-24 16:20:33 -04:00
parent 2d39b773f4
commit 944204a441
No known key found for this signature in database
GPG key ID: 5019678FD9CF50D8

View file

@ -20,8 +20,8 @@ db = os.getenv('DB')
required_role_id = os.getenv('REQUIRED_ROLE_ID') required_role_id = os.getenv('REQUIRED_ROLE_ID')
class Moderation(commands.Cog): class Moderation(commands.Cog):
def __init__(self, bot): def __init__(self, client):
self.bot = bot self.client: revolt.Client = client
disable_dateutil() disable_dateutil()
def mysql_connect(self): def mysql_connect(self):
@ -66,7 +66,7 @@ class Moderation(commands.Cog):
return return
async def tempban_handler(self): async def tempban_handler(self):
for server in self.servers: for server in self.client.servers:
database = Moderation.mysql_connect(self) database = Moderation.mysql_connect(self)
cursor = database.cursor() cursor = database.cursor()
bans = await server.fetch_bans() bans = await server.fetch_bans()