Compare commits
2 Commits
2e3ce28468
...
35d70be495
| Author | SHA1 | Date | |
|---|---|---|---|
| 35d70be495 | |||
| 7749a2735a |
@ -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, )
|
||||
|
||||
@ -63,7 +63,10 @@ async def bind(ctx: commands.Context, username: str):
|
||||
elif group == 'DSP':
|
||||
dc_group = 'DSP 組'
|
||||
elif group == 'GRAPHICS':
|
||||
dc_group = 'G 組'
|
||||
if teacher == 'robin':
|
||||
dc_group = 'Robin 組'
|
||||
else:
|
||||
dc_group = 'G 組'
|
||||
elif group == 'NETWORK':
|
||||
dc_group = 'N 組'
|
||||
elif group == 'AIMM':
|
||||
|
||||
Loading…
Reference in New Issue
Block a user