|
|
@ -2,6 +2,7 @@ import asyncio
|
|
|
|
import datetime
|
|
|
|
import datetime
|
|
|
|
import os
|
|
|
|
import os
|
|
|
|
import random
|
|
|
|
import random
|
|
|
|
|
|
|
|
from contextlib import closing
|
|
|
|
|
|
|
|
|
|
|
|
import discord
|
|
|
|
import discord
|
|
|
|
from discord import Embed
|
|
|
|
from discord import Embed
|
|
|
@ -167,13 +168,12 @@ class Modmail(commands.Cog, command_attrs=dict(hidden=True)):
|
|
|
|
# Get the author's row from the Members Table
|
|
|
|
# Get the author's row from the Members Table
|
|
|
|
select_query = """SELECT * FROM moderatormail WHERE guildID = (?)"""
|
|
|
|
select_query = """SELECT * FROM moderatormail WHERE guildID = (?)"""
|
|
|
|
val = guildid,
|
|
|
|
val = guildid,
|
|
|
|
cursor = conn.cursor()
|
|
|
|
with closing(conn.cursor()) as cursor:
|
|
|
|
|
|
|
|
|
|
|
|
# Execute the SQL Query
|
|
|
|
# Execute the SQL Query
|
|
|
|
cursor.execute(select_query, val)
|
|
|
|
cursor.execute(select_query, val)
|
|
|
|
result = cursor.fetchone()
|
|
|
|
result = cursor.fetchone()
|
|
|
|
|
|
|
|
|
|
|
|
# Adding error handling
|
|
|
|
# Adding error handlingpip3 install
|
|
|
|
if result is None:
|
|
|
|
if result is None:
|
|
|
|
return
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
|