refactor: Split stats module from study.

This commit is contained in:
2021-12-29 20:13:24 +02:00
parent e2c096f350
commit 6aaa2377a4
8 changed files with 26 additions and 5 deletions

13
bot/modules/stats/data.py Normal file
View File

@@ -0,0 +1,13 @@
from data import Table
profile_tags = Table('member_profile_tags', attach_as='profile_tags')
@profile_tags.save_query
def get_tags_for(guildid, userid):
rows = profile_tags.select_where(
guildid=guildid, userid=userid,
_extra="ORDER BY tagid ASC"
)
return [row['tag'] for row in rows]