Add some cleanup to charge status, and then lowercase trunk
This commit is contained in:
15
commands.go
15
commands.go
@ -113,11 +113,14 @@ func chargeStatus(m chat1.MsgSummary) {
|
||||
}
|
||||
ret := fmt.Sprintf("Status for %+v: ```", v.DisplayName)
|
||||
ret += fmt.Sprintf("\nCurrent Charge: %+v (%+vmi)", state.BatteryLevel, state.BatteryRange)
|
||||
ret += fmt.Sprintf("\nCharging State: %+v", state.ChargingState)
|
||||
ret += fmt.Sprintf("\nTime to full: %+vmin", state.MinutesToFullCharge)
|
||||
ret += fmt.Sprintf("\nConnected Cable: %+v", state.ConnChargeCable)
|
||||
if state.FastChargerPresent {
|
||||
ret += fmt.Sprintf("\nFast Charger: %+v %+v", state.FastChargerBrand, state.FastChargerType)
|
||||
if state.ChargingState != "Disconnected" {
|
||||
|
||||
ret += fmt.Sprintf("\nCharging State: %+v", state.ChargingState)
|
||||
ret += fmt.Sprintf("\nTime to full: %+vmin", state.MinutesToFullCharge)
|
||||
ret += fmt.Sprintf("\nConnected Cable: %+v", state.ConnChargeCable)
|
||||
if state.FastChargerPresent {
|
||||
ret += fmt.Sprintf("\nFast Charger: %+v %+v", state.FastChargerBrand, state.FastChargerType)
|
||||
}
|
||||
}
|
||||
ret += "```\n"
|
||||
if state.BatteryHeaterOn {
|
||||
@ -346,7 +349,7 @@ func openTrunk(m chat1.MsgSummary) {
|
||||
switch trunk {
|
||||
case "rear":
|
||||
case "front":
|
||||
err := v.OpenTrunk(trunk)
|
||||
err := v.OpenTrunk(strings.ToLower(trunk))
|
||||
if err != nil {
|
||||
tracker := uuid.NewString()
|
||||
k.SendMessageByConvID(m.ConvID, "There was an error opening your trunk. Contact @rudi9719 for more information with code %+v", tracker)
|
||||
|
||||
Reference in New Issue
Block a user