Added get applications function
parent
9aafca25cf
commit
5a4ee3dda3
|
@ -93,6 +93,14 @@ class GuildAppDB():
|
|||
if application_name in applications.keys():
|
||||
return applications[application_name]
|
||||
|
||||
def get_applications(guild_id: str):
|
||||
con = sqlite3.connect("applications.db")
|
||||
cur = con.cursor()
|
||||
cur.execute("SELECT applications_blob FROM app_guildapp_db WHERE guild_id=(?)", (guild_id, ))
|
||||
application_blob = cur.fetchone()
|
||||
applications = pickle.loads(application_blob[0])
|
||||
return list(applications.keys())
|
||||
|
||||
def set_response_channel(guild_id: str, application_name: str, channel_id: str) -> str:
|
||||
con = sqlite3.connect("applications.db")
|
||||
cur = con.cursor()
|
||||
|
|
Loading…
Reference in New Issue