Erisa / Cliptok

Moderation Discord bot for Microsoft Community.
https://msft.chat/about/bots.html#cliptok
MIT License
63 stars 26 forks source link

Bug: Insider thread creation fails #220

Closed Erisa closed 3 months ago

Erisa commented 3 months ago
[2024-08-19 21:08:16 +00:00] [Error] Error during invocation of interaction command "announcebuild" by "floatingmilkshake"
System.InvalidOperationException: Threads can only be created within text or news channels.
   at DSharpPlus.Entities.DiscordMessage.CreateThreadAsync(String name, DiscordAutoArchiveDuration archiveAfter, String reason)
   at Cliptok.Commands.InteractionCommands.AnnouncementInteractions.AnnounceBuildSlashCommand(InteractionContext ctx, Int64 windowsVersion, String buildNumber, String blogLink, String insiderChannel1, String insiderChannel2, Boolean canaryCreateNewThread, DiscordChannel threadChannel, String flavourText, String autothreadName, String lockdownTime) in /app/Commands/InteractionCommands/AnnouncementInteractions.cs:line 218
   at DSharpPlus.SlashCommands.SlashCommandsExtension.RunCommandAsync(BaseContext context, MethodInfo method, IEnumerable`1 args)
   at DSharpPlus.SlashCommands.SlashCommandsExtension.<>c__DisplayClass53_0.<<InteractionHandler>b__0>d.MoveNext()

https://discord.com/channels/150662382874525696/968463420586336286/1275199684679565466

Erisa commented 3 months ago

Temp fixed in https://github.com/Erisa/Cliptok/commit/1b1f8081610bcdccf4824d04a59b03eb48ca1ef9 and https://github.com/Erisa/Cliptok/commit/d092f25b8ce1d4a95a71e374e76d7bca93a8c069

Caused by https://github.com/DSharpPlus/DSharpPlus/commit/1d54d42c55c6c3719928c5f3f153adf8c1b92da8

Full fix will be a resolution of https://github.com/DSharpPlus/DSharpPlus/issues/2060