Skip to content

Commit

Permalink
更新module名称
Browse files Browse the repository at this point in the history
  • Loading branch information
yongxin-ms committed Feb 24, 2023
1 parent ea0327d commit 00ebfa2
Show file tree
Hide file tree
Showing 8 changed files with 59 additions and 645 deletions.
7 changes: 4 additions & 3 deletions bootstrap/telegram.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ import (
"strings"
"time"

"wechatbot/config"
"wechatbot/handler/telegram"
"wechatbot/utils"

tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api/v5"
log "github.com/sirupsen/logrus"
"github.com/wechatgpt/wechatbot/config"
"github.com/wechatgpt/wechatbot/handler/telegram"
"github.com/wechatgpt/wechatbot/utils"
)

func StartTelegramBot() {
Expand Down
3 changes: 2 additions & 1 deletion bootstrap/wechat.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ package bootstrap
import (
"os"

"wechatbot/handler/wechat"

"github.com/eatmoreapple/openwechat"
log "github.com/sirupsen/logrus"
"github.com/wechatgpt/wechatbot/handler/wechat"
)

func StartWebChat() {
Expand Down
27 changes: 22 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,10 +1,27 @@
module github.com/wechatgpt/wechatbot
module wechatbot

go 1.16
go 1.20

require (
github.com/eatmoreapple/openwechat v1.2.1
github.com/eatmoreapple/openwechat v1.4.1
github.com/go-telegram-bot-api/telegram-bot-api/v5 v5.5.1
github.com/sirupsen/logrus v1.6.0
github.com/spf13/viper v1.14.0
github.com/sirupsen/logrus v1.9.0
github.com/spf13/viper v1.15.0
)

require (
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/pelletier/go-toml/v2 v2.0.6 // indirect
github.com/spf13/afero v1.9.3 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/subosito/gotenv v1.4.2 // indirect
golang.org/x/sys v0.3.0 // indirect
golang.org/x/text v0.5.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
649 changes: 20 additions & 629 deletions go.sum

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion handler/telegram/telegram.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ package telegram
import (
"strings"

"wechatbot/openai"

log "github.com/sirupsen/logrus"
"github.com/wechatgpt/wechatbot/openai"
)

func Handle(msg string) *string {
Expand Down
7 changes: 4 additions & 3 deletions handler/wechat/wechat_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ import (
"fmt"
"strings"

"wechatbot/config"
"wechatbot/openai"
"wechatbot/utils"

"github.com/eatmoreapple/openwechat"
log "github.com/sirupsen/logrus"
"github.com/wechatgpt/wechatbot/config"
"github.com/wechatgpt/wechatbot/openai"
"github.com/wechatgpt/wechatbot/utils"
)

var _ MessageHandlerInterface = (*GroupMessageHandler)(nil)
Expand Down
5 changes: 3 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package main

import (
"wechatbot/bootstrap"
"wechatbot/config"

log "github.com/sirupsen/logrus"
"github.com/wechatgpt/wechatbot/bootstrap"
"github.com/wechatgpt/wechatbot/config"
)

func main() {
Expand Down
3 changes: 2 additions & 1 deletion openai/chatgpt.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ import (
"net/http"
"strings"

"wechatbot/config"

log "github.com/sirupsen/logrus"
"github.com/wechatgpt/wechatbot/config"
)

// ChatGPTResponseBody 请求体
Expand Down

0 comments on commit 00ebfa2

Please sign in to comment.