Skip to content
This repository has been archived by the owner on Dec 16, 2023. It is now read-only.

Commit

Permalink
Fix disable social filter
Browse files Browse the repository at this point in the history
  • Loading branch information
Amaototi committed Nov 13, 2023
1 parent df9a244 commit 4ef81c3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/cmds/chat.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,6 @@ func ChatCmd(session *discordgo.Session, orgMsg *discordgo.MessageCreate, guild

content, repnum, tmpnum, topnum, systemstr, model, cmodel, filter, imgurl, detail := splitMsg(msg, guild)

if content == "" {
ErrorReply(session, orgMsg, config.Lang[config.CurrentConfig.Guild.Lang].Error.SubCmd)
return
}

if strings.Contains(strings.ReplaceAll(*msg, content, ""), "-d") && !strings.Contains(strings.ReplaceAll(*msg, content, ""), "-i") {
ErrorReply(session, orgMsg, config.Lang[config.CurrentConfig.Guild.Lang].Error.NoImage)
return
Expand Down Expand Up @@ -89,6 +84,11 @@ func ChatCmd(session *discordgo.Session, orgMsg *discordgo.MessageCreate, guild
return
}

if content == "" {
ErrorReply(session, orgMsg, config.Lang[config.CurrentConfig.Guild.Lang].Error.SubCmd)
return
}

if imgurl != "" {

re := regexp.MustCompile(`https?://[\w!?/+\-_~;.,*&@#$%()'[\]]+`)
Expand Down

0 comments on commit 4ef81c3

Please sign in to comment.