harrygens commited on
Commit
633a011
1 Parent(s): f2aae0d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -38,7 +38,8 @@ def getChooseRole(msg):
38
  start_index = msg.index("As a") + len("As a")
39
  if start_index >= 0:
40
  end_index = msg.index(",")
41
- str = trim(msg[start_index:] + msg[:end_index])
 
42
  if str.lower() == "dm":
43
  return ""
44
  else:
@@ -51,7 +52,9 @@ def getChooseClass(msg):
51
  if full != "":
52
  start_index = full.index(" ") + len(" ")
53
  end_index = msg.index(",")
54
- return trim(full[start_index:] + full[:end_index])
 
 
55
  else:
56
  return ""
57
 
 
38
  start_index = msg.index("As a") + len("As a")
39
  if start_index >= 0:
40
  end_index = msg.index(",")
41
+ str = msg[start_index:] + msg[:end_index]
42
+ str = str.strip()
43
  if str.lower() == "dm":
44
  return ""
45
  else:
 
52
  if full != "":
53
  start_index = full.index(" ") + len(" ")
54
  end_index = msg.index(",")
55
+ str = full[start_index:] + full[:end_index])
56
+ str = str.strip()
57
+ return str
58
  else:
59
  return ""
60