style(messages,threads): format code
This commit is contained in:
@@ -65,6 +65,9 @@ func (c channelsInfo) Info() *dgo.ApplicationCommand {
|
||||
Description: "The channel to manage",
|
||||
ChannelTypes: []dgo.ChannelType{
|
||||
dgo.ChannelTypeGuildText,
|
||||
dgo.ChannelTypeGuildForum,
|
||||
dgo.ChannelTypeGuildPublicThread,
|
||||
dgo.ChannelTypeGuildPrivateThread,
|
||||
},
|
||||
}},
|
||||
}
|
||||
@@ -264,6 +267,9 @@ func (c channelsSetLang) Info() *dgo.ApplicationCommand {
|
||||
Description: "The channel to change the language",
|
||||
ChannelTypes: []dgo.ChannelType{
|
||||
dgo.ChannelTypeGuildText,
|
||||
dgo.ChannelTypeGuildForum,
|
||||
dgo.ChannelTypeGuildPublicThread,
|
||||
dgo.ChannelTypeGuildPrivateThread,
|
||||
},
|
||||
}},
|
||||
}
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
package events
|
||||
|
||||
import (
|
||||
e "errors"
|
||||
"log/slog"
|
||||
"slices"
|
||||
|
||||
"dislate/internals/discord/bot/errors"
|
||||
"dislate/internals/discord/bot/gconf"
|
||||
"dislate/internals/guilddb"
|
||||
"dislate/internals/translator"
|
||||
"dislate/internals/translator/lang"
|
||||
e "errors"
|
||||
"log/slog"
|
||||
"slices"
|
||||
|
||||
dgo "github.com/bwmarrin/discordgo"
|
||||
)
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
package events
|
||||
|
||||
import (
|
||||
e "errors"
|
||||
"log/slog"
|
||||
"sync"
|
||||
|
||||
"dislate/internals/discord/bot/errors"
|
||||
"dislate/internals/discord/bot/gconf"
|
||||
gdb "dislate/internals/guilddb"
|
||||
"dislate/internals/translator"
|
||||
e "errors"
|
||||
"log/slog"
|
||||
"sync"
|
||||
|
||||
dgo "github.com/bwmarrin/discordgo"
|
||||
)
|
||||
@@ -25,11 +26,6 @@ func (h ThreadCreate) Serve(s *dgo.Session, ev *dgo.ThreadCreate) {
|
||||
log := gconf.GetLogger(ev.GuildID, s, h.db)
|
||||
log.Debug("Thread created!", slog.String("parent", ev.ParentID), slog.String("thread", ev.ID))
|
||||
|
||||
if len(ev.AppliedTags) > 0 {
|
||||
log.Debug("New thread is in forum, unimplemented, ignoring")
|
||||
return
|
||||
}
|
||||
|
||||
// INFO: Threads have the same ID as the origin message of them
|
||||
threadMsg, err := h.db.Message(ev.GuildID, ev.ParentID, ev.ID)
|
||||
if e.Is(err, gdb.ErrNotFound) {
|
||||
|
||||
Reference in New Issue
Block a user