コード例 #1
0
        public WikiSearcher(DiscordSocketClient discord, TownDatabase database)
        {
            this.database = database;
            this.discord  = discord;

            discord.MessageReceived += Search;
        }
コード例 #2
0
        public CrossAlerter(DiscordSocketClient discord, TownDatabase database)
        {
            this.discord  = discord;
            this.database = database;

            discord.MessageReceived += Process;
        }
コード例 #3
0
		public PointCounter(DiscordSocketClient discord, TownDatabase database)
		{
			this.database = database;
			this.discord = discord;

			discord.MessageReceived += Handle;
		}
コード例 #4
0
        public ChannelFilters(DiscordSocketClient discord, TownDatabase database, InteractiveService interactive)
        {
            this.database    = database;
            this.discord     = discord;
            this.interactive = interactive;

            discord.MessageReceived += Handle;
        }
コード例 #5
0
        public NewcomerService(DiscordSocketClient discord, TownDatabase database, IServiceProvider provider)
        {
            this.discord  = discord;
            this.provider = provider;
            this.database = database;

            discord.UserJoined += UserJoined;
            discord.UserLeft   += AlertTeam;
        }
コード例 #6
0
        public AltaAPI(TownDatabase database, TimerService timer)
        {
            this.database = database;
            this.timer    = timer;

            StartWithEndpoint(HighLevelApiClientFactory.ProductionEndpoint);

            EnsureLoggedIn().Wait();
            //No need to update username/identifier on interval. Needs to be changed to update supporter status, only for those who it's passed expiry for
            //this.timer.OnClockInterval += _timer_OnClockInterval;
        }
コード例 #7
0
		public AccountService(DiscordSocketClient client, TownDatabase database, AltaAPI altaApi, TimerService timer)
		{
			Client = client;
			Database = database;
			AltaApi = altaApi;

			timer.OnClockInterval += UpdateAll;

			//Console.WriteLine(database.Users.Count(item => item.AltaInfo != null));

			//Migrate();
		}
コード例 #8
0
        public CommandHandlingService(IConfiguration config, IServiceProvider provider, TownDatabase database, DiscordSocketClient discord, CommandService commands, CommandCacheService cache, InteractiveService interactive)
        {
            this.discord     = discord;
            this.commands    = commands;
            this.provider    = provider;
            this.config      = config;
            this.interactive = interactive;
            this.cache       = cache;
            this.database    = database;

            this.discord.MessageReceived += MessageReceived;
            this.discord.ReactionAdded   += OnReactAdded;
            this.discord.MessageUpdated  += OnMessageUpdated;
        }