forked from blizzthewolf/SeaCogs
fix(aurora): pylint fix + sqlite connection fix
This commit is contained in:
parent
a402f23001
commit
4226d0b6fe
1 changed files with 4 additions and 4 deletions
|
@ -3,7 +3,6 @@
|
|||
import json
|
||||
import time
|
||||
import sqlite3
|
||||
from os import sep
|
||||
from datetime import datetime
|
||||
|
||||
from discord import Guild
|
||||
|
@ -16,7 +15,7 @@ from .utils import generate_dict, get_next_case_number
|
|||
def connect() -> sqlite3.Connection:
|
||||
"""Connects to the SQLite database, and returns a connection object."""
|
||||
try:
|
||||
connection = sqlite3.connect(database=data_manager.cog_data_path(raw_name='Moderation') + sep + 'moderation.db')
|
||||
connection = sqlite3.connect(database=data_manager.cog_data_path(raw_name='Aurora') / 'aurora.db')
|
||||
return connection
|
||||
|
||||
except sqlite3.ProgrammingError as e:
|
||||
|
@ -103,6 +102,7 @@ async def create_guild_table(guild: Guild):
|
|||
database.close()
|
||||
|
||||
|
||||
# pylint: disable=dangerous-default-value
|
||||
async def mysql_log(
|
||||
guild_id: str,
|
||||
author_id: str,
|
||||
|
@ -118,8 +118,8 @@ async def mysql_log(
|
|||
resolved_by: str = None,
|
||||
resolved_reason: str = None,
|
||||
expired: bool = None,
|
||||
changes: list = [], # pylint: disable=dangerous-default-value
|
||||
metadata: dict = {}, # pylint: disable=dangerous-default-value
|
||||
changes: list = [],
|
||||
metadata: dict = {},
|
||||
) -> int:
|
||||
if not timestamp:
|
||||
timestamp = int(time.time())
|
||||
|
|
Loading…
Reference in a new issue