Compare commits

...

2 Commits

2 changed files with 6 additions and 3 deletions

View File

@ -18,13 +18,13 @@ class CMLAccountManager():
def find_user(self, username):
try:
cursor = self.conn.cursor()
cursor = self.conn.cursor(buffered=True)
except:
if self.conn.is_connected():
self.conn.close()
print("Restart DB Connection")
self.conn = mysql.connector.connect(**self.config)
cursor = self.conn.cursor()
cursor = self.conn.cursor(buffered=True)
query = "SELECT * FROM `People` WHERE `account`=%s"
param = (username, )

View File

@ -63,6 +63,9 @@ async def bind(ctx: commands.Context, username: str):
elif group == 'DSP':
dc_group = 'DSP 組'
elif group == 'GRAPHICS':
if teacher == 'robin':
dc_group = 'Robin 組'
else:
dc_group = 'G 組'
elif group == 'NETWORK':
dc_group = 'N 組'