private CommandService _commands;
private IServiceProvider _services:
public async Task InitializeAsync()
{
_commands = new CommandService();
_services = new ServiceCollection()
.AddSingleton(_commands)
.BuildServiceProvider();
await _commands.AddModulesAsync(Assembly.GetEntryAssembly(), _services);
}
private CommandService _commands;
private IServiceProvider _services:
public async Task InitializeAsync()
{
_commands = new CommandService();
_services = new ServiceCollection()
.AddSingleton(_commands)
.BuildServiceProvider();
await _commands.AddModulesAsync(Assembly.GetEntryAssembly(), _services);
}