Beispiel #1
0
 public DiscordBot(IServiceProvider services, DiscordBotConfiguration configuration,
                   DiscordShardedClient client, DiscordRestClient rest,
                   QCommandsHandler commands, DiscordEventHandler eventHandler)
 {
     Commands           = new Dictionary <string, Command>();
     Config             = configuration;
     Client             = client;
     Rest               = rest;
     this._services     = services;
     this._commands     = commands;
     this._eventHandler = eventHandler;
 }
Beispiel #2
0
        public QaIrc(IrcConfiguration config, IrcRegistrationInfo userInfo, ILogger <QaIrc> logger,
                     QCommandsHandler commandHandler, RelayService relay, IServiceProvider services)
        {
            _hostname       = config.Connection;
            _userInfo       = userInfo;
            _logger         = logger;
            _commandHandler = commandHandler;
            _relay          = relay;
            _relay.DiscordMessageReceived += BounceToIRC;
            _services = services;
            _channels = config.Channels;

            InitializeClient();
        }