Added get_response_channel
parent
75c3f98c98
commit
0d28df7868
|
@ -139,6 +139,15 @@ class GuildAppDB():
|
|||
else:
|
||||
return "error on set response channel: application not found"
|
||||
|
||||
def get_response_channel(guild_id: str, application_name: str) -> 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])
|
||||
if application_name in applications.keys():
|
||||
return applications[application_name]["resp_channel"]
|
||||
|
||||
def add_question(guild_id: str, application_name: str, question: str) -> str:
|
||||
con = sqlite3.connect("applications.db")
|
||||
cur = con.cursor()
|
||||
|
|
Loading…
Reference in New Issue