Horizon
Horizon
CC#
Created by Horizon on 5/30/2024 in #help
Microsoft.Extensions.Logging.Console
using DSharpPlus;
using DSharpPlus.Commands;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging.Console;
//...
//...
public static CommandsConfiguration CommandsConfiguration
{
get => new CommandsConfiguration
{
ServiceProvider = new ServiceCollection().AddLogging(x => x.AddConsole()).BuildServiceProvider()

};
}
using DSharpPlus;
using DSharpPlus.Commands;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging.Console;
//...
//...
public static CommandsConfiguration CommandsConfiguration
{
get => new CommandsConfiguration
{
ServiceProvider = new ServiceCollection().AddLogging(x => x.AddConsole()).BuildServiceProvider()

};
}
I try to build a Discord bot. I follow the instructions here: https://dsharpplus.github.io/DSharpPlus/articles/migration/slashcommands_to_commands.html but I doesn't work (I added Microsoft.Extensions.Logging.Console).
9 replies