コード例 #1
0
        public async Task Start()
        {
            client = new DiscordSocketClient(new DiscordSocketConfig
            {
                LogLevel         = LogSeverity.Info,
                MessageCacheSize = 100,
            });

            commands = new CommandService(new CommandServiceConfig
            {
                LogLevel = LogSeverity.Info
            });

            //client.Log += Log;
            client.Ready += Client_Ready;

            embeds   = new GoogleEmbeds();
            provider = ConfigureServices();



            string token = IsDev ? File.ReadAllText(@"Tokens\whalebotdev.txt") : File.ReadAllText(@"Tokens\whalebot.txt");

            await InstallCommands();


            await client.LoginAsync(TokenType.Bot, token);

            await client.StartAsync();

            Console.Title = "WhaleBot";
            await Task.Delay(-1);
        }
コード例 #2
0
 public GoogleCommands(GoogleEmbeds Embeds)
 {
     this.Embeds = Embeds;
 }
コード例 #3
0
 public GoogleReactionHandler(DiscordSocketClient client, GoogleEmbeds embeds)
 {
     this.client           = client;
     this.embeds           = embeds;
     client.ReactionAdded += Client_ReactionAdded;
 }