Exemplo n.º 1
0
 public DiscordClient()
 {
     Settings      = new DiscordSettings();
     Client        = new DiscordSocketClient();
     Uploader      = new DiscordUploader();
     LocalUploader = new LocalUploader();
     SetupBot();
 }
Exemplo n.º 2
0
        public static DiscordSettings New(string path)
        {
            var settings = new DiscordSettings();

            Console.WriteLine("Discord token?");
            settings.Token         = Console.ReadLine();
            settings.PixivChannels = Console.ReadLine().Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries).Select(c => ulong.TryParse(c, out var cid) ? cid : 0).Where(id => id != 0).ToDictionary(id => id, id => new PixivChannelSettings());
            settings.Save(path);
            return(settings);
        }