Skip to content
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

SocketCategoryChannel.Channels returns all categories instead of channels inside the category #1101

Closed
Ryhon0 opened this issue Jul 2, 2018 · 3 comments
Labels

Comments

@Ryhon0
Copy link

Ryhon0 commented Jul 2, 2018

I don't know if it's intended but CategoryChannel.Channels returns all the channel categories instead of channels inside this category

I wrote a code wich should show all the categories and channels inside them but it shows the categories inside of a category

foreach (var category in guild.CategoryChannels) { Console.WriteLine(category.Name); foreach (var channel in category.Channels) { Console.WriteLine("\t" + channel.Name + "\t" + channel.Id); } }

@Still34
Copy link
Member

Still34 commented Jul 2, 2018

Are you on the latest nightly build? If I recall, this was fixed in #945?

@Ryhon0
Copy link
Author

Ryhon0 commented Jul 2, 2018

I updated to the latest build and it's fixed but now I'm getting the There is no argument given that corresponds to the required formal parameter 'services' of 'CommandService.AddModulesAsync(Assembly, IServiceProvider)' error, how do I fix it?

@foxbot
Copy link
Member

foxbot commented Jul 2, 2018

As of bb8ebc1, modules are built when added to the CommandService, as well as on command execution. As such, an IServiceProvider is now required for the building phase of modules.

You can resolve this by simply passing in an instance of your IServiceProvider to AddModulesAsync - just as you would in CommandService#ExecuteAsync.

For future reference, questions like this are best suited for our Discord support channel, under discord.gg/discord-api.

@foxbot foxbot closed this as completed Jul 2, 2018
@foxbot foxbot added the question label Jul 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants