public CommandHandlingService(IServiceProvider provider, DiscordSocketClient discord, CommandService commands) { InitializeLoader(); LoadDatabase(); _discord = discord; _commands = commands; _provider = provider; _epService = _provider.GetService <EPService>(); _afkSertvice = _provider.GetService <AfkSertvice>(); _updateService = _provider.GetService <UserGuildUpdateService>(); _starBoardService = _provider.GetService <StarBoardService>(); _musicService = _provider.GetService <MusicService>(); _modService = _provider.GetService <ModService>(); _blackListService = _provider.GetService <BlackListService>(); _ratelimitService2 = _provider.GetService <RatelimitService2>(); _globalBans = _provider.GetService <GlobalBanService>(); _playingService = new PlayingWith(_discord); SentryService.client = _discord; ChangelogService.LoadChangelog(); _discord.MessageReceived += _epService.IncreaseEP; _discord.MessageReceived += _afkSertvice.Client_MessageReceived; _discord.UserJoined += _updateService.UserJoined; _discord.UserLeft += _updateService.UserLeft; _discord.ReactionAdded += _starBoardService.StarAddedNew; _discord.ReactionRemoved += _starBoardService.StarRemovedNew; _discord.UserVoiceStateUpdated += _musicService.CheckIfAlone; //Bans _discord.UserBanned += _modService.Client_UserBanned; _discord.UserUnbanned += _modService.Client_UserUnbanned; //Modlog _discord.MessageDeleted += _modService.Client_MessageDeleted; _discord.RoleCreated += _modService.Client_RoleCreated; _discord.RoleDeleted += _modService.Client_RoleDeleted; _discord.RoleUpdated += _modService.Client_RoleUpdated; _discord.ChannelCreated += _modService.Client_ChannelCreated; _discord.ChannelDestroyed += _modService.Client_ChannelDestroyed; _discord.ChannelUpdated += _modService.Client_ChannelUpdated; _discord.GuildUpdated += _modService.Client_GuildUpdated; //Owner _discord.MessageReceived += MessageReceived; _discord.GuildAvailable += Client_GuildAvailable; _discord.JoinedGuild += Client_JoinedGuild; _discord.LeftGuild += Client_LeftGuild; //CommandService _commands.Log += CommandsOnLog; }
public Afk(AfkSertvice afkService) { _afkService = afkService; }