diff --git a/internals/discord/bot/commands/channels.go b/internals/discord/bot/commands/channels.go index 885414a..c333d36 100644 --- a/internals/discord/bot/commands/channels.go +++ b/internals/discord/bot/commands/channels.go @@ -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, }, }}, } diff --git a/internals/discord/bot/events/messages.go b/internals/discord/bot/events/messages.go index e846eda..b5530dc 100644 --- a/internals/discord/bot/events/messages.go +++ b/internals/discord/bot/events/messages.go @@ -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" ) diff --git a/internals/discord/bot/events/threads.go b/internals/discord/bot/events/threads.go index 63228bf..54eef76 100644 --- a/internals/discord/bot/events/threads.go +++ b/internals/discord/bot/events/threads.go @@ -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) {