Compare commits
1 Commits
4653689e5e
...
ce46bd49fe
| Author | SHA1 | Date | |
|---|---|---|---|
| ce46bd49fe |
@@ -41,9 +41,7 @@ class ProfilesComponent(cmds.Component):
|
||||
Fetch or create the profile for the given user.
|
||||
"""
|
||||
userid = str(user.id)
|
||||
async with self.bot.dbconn.connection() as conn:
|
||||
self.bot.dbconn.conn = conn
|
||||
async with conn.transaction():
|
||||
# TODO: Transaction
|
||||
profile = await self.profiles.get_profile_twitch(userid)
|
||||
if profile is None:
|
||||
args = {}
|
||||
@@ -70,9 +68,7 @@ class ProfilesComponent(cmds.Component):
|
||||
Fetch or create the community for this channel.
|
||||
"""
|
||||
chanid = channel.id
|
||||
async with self.bot.dbconn.connection() as conn:
|
||||
self.bot.dbconn.conn = conn
|
||||
async with conn.transaction():
|
||||
# TODO: Transaction
|
||||
comm = await self.profiles.get_community_twitch(chanid)
|
||||
if comm is None:
|
||||
comm = await Community.create()
|
||||
|
||||
Reference in New Issue
Block a user