Ejemplo n.º 1
0
 public CommanderController(
     ICommanderService commander,
     EShopDbContext context
     )
 {
     _commander = commander;
     _context   = context;
 }
Ejemplo n.º 2
0
        public PeskybirdBot(IConfiguration configuration, ILogger logger, DiscordSocketClient client,
                            ICommanderService commanderService)
        {
            // await using var context = new PeskybirdContext();
            _logger = logger;
            _client = client;
            _token  = configuration["PESKY_TOKEN"];

            if (_token == null)
            {
                throw new InvalidOperationException("Bot cannot be started without a token");
            }

            _activator = configuration["PESKY_ACTIVATOR"] ?? "!";
            logger.LogInformation($"activator: {_activator}");


            _commanderService = commanderService;


            _client.MessageReceived       += OnMessageReceived;
            _client.UserVoiceStateUpdated += OnVoiceServerStateUpdate;
        }
Ejemplo n.º 3
0
 public CommandersController(ICommanderService commanderService)
 {
     _commanderService = commanderService;
 }