mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-19 13:59:39 +08:00
19 lines
301 B
Go
19 lines
301 B
Go
package omikuji
|
|
|
|
import "strconv"
|
|
|
|
type kuji struct {
|
|
Id uint8 `db:"id"`
|
|
Text string `db:"text"`
|
|
}
|
|
|
|
// 返回一个解签
|
|
func getKujiByBango(id uint8) string {
|
|
var s kuji
|
|
err := db.Find("kuji", &s, "where id = "+strconv.Itoa(int(id)))
|
|
if err != nil {
|
|
return err.Error()
|
|
}
|
|
return s.Text
|
|
}
|