Ejemplo n.º 1
0
        public ArcadeContext(DiscordSocketClient client, ArcadeContainer data, SocketUserMessage message)
            : base(client, message)
        {
            Data = data;

            if (Guild != null)
            {
                GetOrAddGuild(Guild);
                Server.Synchronize(Guild);
            }
        }
Ejemplo n.º 2
0
 public CommandHandler(DiscordSocketClient client, CommandService service, ArcadeContainer container,
                       IServiceProvider provider, InfoService info, GameManager games, IConfigurationRoot config)
 {
     _client    = client;
     _service   = service;
     _container = container;
     _provider  = provider;
     _config    = config;
     _client.MessageReceived  += ReadInputAsync;
     _service.CommandExecuted += OnExecutedAsync;
     _client.Log            += Logger.LogAsync;
     _service.Log           += Logger.LogAsync;
     _client.GuildAvailable += SumGuildCount;
     _client.JoinedGuild    += UpdateGuildCount;
     _client.LeftGuild      += UpdateGuildCount;
     _client.Ready          += OnReady;
     _client.Disconnected   += ResetGuildCount;
     _info  = info;
     _games = games;
 }