Files
nadekobot/src/NadekoBot/Medusa/Adapters/ContextAdapterFactory.cs

9 lines
343 B
C#

using Nadeko.Medusa;
internal class ContextAdapterFactory
{
public static AnyContext CreateNew(ICommandContext context, IMedusaStrings strings, IServiceProvider services)
=> context.Guild is null
? new DmContextAdapter(context, strings, services)
: new GuildContextAdapter(context, strings, services);
}