|
|
@ -282,18 +282,9 @@ class Relationship(Cog):
|
|
|
|
# Getting the guild of the user
|
|
|
|
# Getting the guild of the user
|
|
|
|
guild = member.guild
|
|
|
|
guild = member.guild
|
|
|
|
|
|
|
|
|
|
|
|
# Setup pool
|
|
|
|
# Get the author from the cache
|
|
|
|
pool = self.bot.db
|
|
|
|
result = await self.bot.check_cache(member.id, ctx.guild.id)
|
|
|
|
|
|
|
|
|
|
|
|
# TODO: Replace this entire section with retrieving from cache
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Setup pool connection and cursor
|
|
|
|
|
|
|
|
async with pool.acquire() as conn:
|
|
|
|
|
|
|
|
# Get the author's row from the Members Table
|
|
|
|
|
|
|
|
select_query = """SELECT * FROM members WHERE member_id = $1 and guild_id = $2"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Execute the SQL Query
|
|
|
|
|
|
|
|
result = await conn.fetchrow(select_query, member.id, guild.id)
|
|
|
|
|
|
|
|
user = result["married"]
|
|
|
|
user = result["married"]
|
|
|
|
marriage_date = result["married_date"]
|
|
|
|
marriage_date = result["married_date"]
|
|
|
|
|
|
|
|
|
|
|
|