New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added missing "default_forum_layout" property for DiscordChannel #466
Conversation
Thank you! Could you also check if it's in the modify / create function? |
@Lulalaby If you mean the ModifyChannelAsync and CreateChannelAsync methods, I believe it's not, but I can try adding it. (Sorry, I might do/understand something wrong, its my first PR) |
Yeah exactly! |
Uh, so I've been trying to wrap my head around the whole structure, and these methods use modify/create payload types to build queries. |
yeah that's exactly how to do it |
Take a look at 93aee4e |
Great! Then I'll do it tomorrow. |
Sounds good |
I noticed right now, wouldn't, |
If you look at https://github.com/Aiko-IT-Systems/DisCatSharp/pull/466/files, you'll see the missing places. |
This seems to be it. |
I might be wrong, but i meant this one, which is in |
Ohhhhh. Yeah sure go for it! |
Done! :) |
@TheXorog can you also take a look |
lgtm not quite familiar with how the forum stuff works for the most part though, so i trust your word that everythings implemented thats needed. what is implemented looks to be in line with everything else. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One small thing tho, audit log reason should always be the last arg
@LaPepega can you work on the last feedback please |
Sorry, i totally forgot, should be all good now though |
@TheXorog could u test? |
Will do in about half an hour 👍 |
Tested with this: [SlashCommand("forum", "Test.")]
public async Task DefaultForum(InteractionContext ctx, [Option("channel", "channel"), ChannelTypes(ChannelType.Forum)]DiscordChannel channel, [Option("layout", "layout")]ForumLayout layout)
{
await channel.ModifyForumAsync(x => x.DefaultForumLayout = layout);
await ctx.CreateResponseAsync(InteractionResponseType.DeferredChannelMessageWithSource, new DiscordInteractionResponseBuilder().AsEphemeral());
}
[SlashCommand("forum2", "Test.")]
public async Task DefaultForum2(InteractionContext ctx, [Option("layout", "layout")]ForumLayout layout)
{
await ctx.Guild.CreateForumChannelAsync("test", ctx.Guild.GetChannel(1019898956316151850), defaultLayout: layout);
await ctx.CreateResponseAsync(InteractionResponseType.DeferredChannelMessageWithSource, new DiscordInteractionResponseBuilder().WithContent("Success").AsEphemeral());
} Seems all to be working. |
Thanks for your contribution! @LaPepega |
Description
Added missing "default_forum_layout" property for DiscordChannel
Fixes #436
Type of change