Esempio n. 1
0
        public DiscordHandler(API api, IEventHandler eventHandler)
        {
            DiscordRepository = DiscordRepository.GetInstance();
            DiscordEvents.GetInstance();
            BotManagment = new BotManagment.BotManagment(DiscordRepository);

            // Debug
            DiscordEvents.OnChannelMessage += (channel, author, message) =>
            {
                ConsoleOutput.WriteLine(ConsoleType.Debug,
                                        $"{channel.ChannelName} -> {author.Username}: ${message}");
            };
        }
Esempio n. 2
0
 public static DiscordEvents GetInstance()
 {
     return(_discordEvents ?? (_discordEvents = new DiscordEvents()));
 }