3
2
forked from Dniel97/artemis

Added call for getting rival's music lists

This commit is contained in:
EmmyHeart 2023-07-11 09:13:19 +00:00
parent 75842b5a88
commit c01d3f49f5

View File

@ -200,3 +200,10 @@ class ChuniScoreData(BaseData):
if result is None:
return None
return result.lastrowid
def get_rival_music(self, rival_id: int, index: int, max_count: int) -> Optional[List[Dict]]:
sql = select(playlog).where(playlog.c.user == rival_id).limit(max_count).offset(index)
result = self.execute(sql)
if result is None:
return None
return result.fetchall()