예제 #1
0
 public GuildCommands(IPrefixService prefixService, Logger.Logger logger, GuildService guildService, CommandService commands, IDisabledCommandService disabledCommandService)
 {
     this._prefixService          = prefixService;
     this._logger                 = logger;
     this._guildService           = guildService;
     this._commands               = commands;
     this._disabledCommandService = disabledCommandService;
     this._adminService           = new AdminService();
     this._embed = new EmbedBuilder()
                   .WithColor(Constants.LastFMColorRed);
     this._embedAuthor = new EmbedAuthorBuilder();
     this._embedFooter = new EmbedFooterBuilder();
 }
예제 #2
0
 public StartupService(
     IServiceProvider provider,
     DiscordShardedClient discord,
     CommandService commands,
     Logger.Logger logger,
     IPrefixService prefixService,
     IDisabledCommandService disabledCommands)
 {
     this._provider         = provider;
     this._client           = discord;
     this._commands         = commands;
     this._logger           = logger;
     this._prefixService    = prefixService;
     this._disabledCommands = disabledCommands;
 }
예제 #3
0
 // DiscordSocketClient, CommandService, IConfigurationRoot, and IServiceProvider are injected automatically from the IServiceProvider
 public CommandHandler(
     DiscordShardedClient discord,
     CommandService commands,
     IServiceProvider provider,
     IPrefixService prefixService,
     IDisabledCommandService disabledCommandService,
     UserService userService)
 {
     this._discord                  = discord;
     this._commands                 = commands;
     this._provider                 = provider;
     this._prefixService            = prefixService;
     this._disabledCommandService   = disabledCommandService;
     this._userService              = userService;
     this._discord.MessageReceived += OnMessageReceivedAsync;
 }