mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-19 13:59:39 +08:00
🎨 改进代码样式
This commit is contained in:
parent
045ee091a7
commit
6186356496
@ -5,12 +5,13 @@ import (
|
|||||||
"crypto/md5"
|
"crypto/md5"
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/FloatTech/ZeroBot-Plugin/utils/txt2img"
|
|
||||||
"os"
|
"os"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
|
"github.com/FloatTech/ZeroBot-Plugin/utils/txt2img"
|
||||||
|
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
zero "github.com/wdvxdr1123/ZeroBot"
|
zero "github.com/wdvxdr1123/ZeroBot"
|
||||||
"github.com/wdvxdr1123/ZeroBot/extension"
|
"github.com/wdvxdr1123/ZeroBot/extension"
|
||||||
|
|||||||
@ -2,12 +2,13 @@
|
|||||||
package bookreview
|
package bookreview
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/FloatTech/ZeroBot-Plugin/utils/txt2img"
|
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
zero "github.com/wdvxdr1123/ZeroBot"
|
zero "github.com/wdvxdr1123/ZeroBot"
|
||||||
"github.com/wdvxdr1123/ZeroBot/message"
|
"github.com/wdvxdr1123/ZeroBot/message"
|
||||||
"github.com/wdvxdr1123/ZeroBot/utils/helper"
|
"github.com/wdvxdr1123/ZeroBot/utils/helper"
|
||||||
|
|
||||||
|
"github.com/FloatTech/ZeroBot-Plugin/utils/txt2img"
|
||||||
|
|
||||||
"github.com/FloatTech/ZeroBot-Plugin/control"
|
"github.com/FloatTech/ZeroBot-Plugin/control"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -1,10 +1,12 @@
|
|||||||
package mockingbird
|
package mockingbird
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"os"
|
||||||
|
|
||||||
|
"github.com/sirupsen/logrus"
|
||||||
|
|
||||||
"github.com/FloatTech/ZeroBot-Plugin/utils/file"
|
"github.com/FloatTech/ZeroBot-Plugin/utils/file"
|
||||||
"github.com/FloatTech/ZeroBot-Plugin/utils/process"
|
"github.com/FloatTech/ZeroBot-Plugin/utils/process"
|
||||||
"github.com/sirupsen/logrus"
|
|
||||||
"os"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// 加载数据库
|
// 加载数据库
|
||||||
|
|||||||
@ -3,16 +3,6 @@ package mockingbird
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"github.com/FloatTech/ZeroBot-Plugin/control"
|
|
||||||
"github.com/FloatTech/ZeroBot-Plugin/plugin_qingyunke"
|
|
||||||
fileutil "github.com/FloatTech/ZeroBot-Plugin/utils/file"
|
|
||||||
"github.com/FloatTech/ZeroBot-Plugin/utils/web"
|
|
||||||
log "github.com/sirupsen/logrus"
|
|
||||||
"github.com/tidwall/gjson"
|
|
||||||
zero "github.com/wdvxdr1123/ZeroBot"
|
|
||||||
"github.com/wdvxdr1123/ZeroBot/extension/rate"
|
|
||||||
"github.com/wdvxdr1123/ZeroBot/message"
|
|
||||||
"github.com/wdvxdr1123/ZeroBot/utils/helper"
|
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"mime/multipart"
|
"mime/multipart"
|
||||||
@ -20,6 +10,18 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
log "github.com/sirupsen/logrus"
|
||||||
|
"github.com/tidwall/gjson"
|
||||||
|
zero "github.com/wdvxdr1123/ZeroBot"
|
||||||
|
"github.com/wdvxdr1123/ZeroBot/extension/rate"
|
||||||
|
"github.com/wdvxdr1123/ZeroBot/message"
|
||||||
|
"github.com/wdvxdr1123/ZeroBot/utils/helper"
|
||||||
|
|
||||||
|
"github.com/FloatTech/ZeroBot-Plugin/control"
|
||||||
|
qingyunke "github.com/FloatTech/ZeroBot-Plugin/plugin_qingyunke"
|
||||||
|
fileutil "github.com/FloatTech/ZeroBot-Plugin/utils/file"
|
||||||
|
"github.com/FloatTech/ZeroBot-Plugin/utils/web"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -58,7 +60,6 @@ func init() {
|
|||||||
fileName := getWav(textReply, syntPath, vocoderList[1], ctx.Event.UserID)
|
fileName := getWav(textReply, syntPath, vocoderList[1], ctx.Event.UserID)
|
||||||
// 回复
|
// 回复
|
||||||
ctx.SendChain(message.Record("file:///" + fileutil.BOTPATH + "/" + cachePath + fileName))
|
ctx.SendChain(message.Record("file:///" + fileutil.BOTPATH + "/" + cachePath + fileName))
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,6 @@ package novel
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/FloatTech/ZeroBot-Plugin/utils/txt2img"
|
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/http/cookiejar"
|
"net/http/cookiejar"
|
||||||
@ -12,6 +11,8 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/FloatTech/ZeroBot-Plugin/utils/txt2img"
|
||||||
|
|
||||||
"github.com/antchfx/htmlquery"
|
"github.com/antchfx/htmlquery"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
zero "github.com/wdvxdr1123/ZeroBot"
|
zero "github.com/wdvxdr1123/ZeroBot"
|
||||||
|
|||||||
@ -3,12 +3,14 @@ package omikuji
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/FloatTech/ZeroBot-Plugin/utils/txt2img"
|
|
||||||
"github.com/wdvxdr1123/ZeroBot/utils/helper"
|
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/wdvxdr1123/ZeroBot/utils/helper"
|
||||||
|
|
||||||
|
"github.com/FloatTech/ZeroBot-Plugin/utils/txt2img"
|
||||||
|
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
|
|
||||||
"github.com/FloatTech/ZeroBot-Plugin/control"
|
"github.com/FloatTech/ZeroBot-Plugin/control"
|
||||||
|
|||||||
@ -2,10 +2,12 @@
|
|||||||
package shindan
|
package shindan
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/FloatTech/ZeroBot-Plugin/utils/txt2img"
|
"time"
|
||||||
|
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
"github.com/wdvxdr1123/ZeroBot/utils/helper"
|
"github.com/wdvxdr1123/ZeroBot/utils/helper"
|
||||||
"time"
|
|
||||||
|
"github.com/FloatTech/ZeroBot-Plugin/utils/txt2img"
|
||||||
|
|
||||||
"github.com/FloatTech/AnimeAPI/shindanmaker"
|
"github.com/FloatTech/AnimeAPI/shindanmaker"
|
||||||
zero "github.com/wdvxdr1123/ZeroBot"
|
zero "github.com/wdvxdr1123/ZeroBot"
|
||||||
|
|||||||
@ -4,14 +4,16 @@ package txt2img
|
|||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
"github.com/FloatTech/ZeroBot-Plugin/utils/file"
|
|
||||||
"github.com/FloatTech/ZeroBot-Plugin/utils/process"
|
|
||||||
"github.com/fogleman/gg"
|
|
||||||
"github.com/mattn/go-runewidth"
|
|
||||||
log "github.com/sirupsen/logrus"
|
|
||||||
"image/jpeg"
|
"image/jpeg"
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"github.com/fogleman/gg"
|
||||||
|
"github.com/mattn/go-runewidth"
|
||||||
|
log "github.com/sirupsen/logrus"
|
||||||
|
|
||||||
|
"github.com/FloatTech/ZeroBot-Plugin/utils/file"
|
||||||
|
"github.com/FloatTech/ZeroBot-Plugin/utils/process"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user