示例#1
0
        public Task Start()
        {
            SocketGuild server = DiscordHelpers.GetServer(DiscordIds.ServerId, _client);

            if (server != null)
            {
                _channel = DiscordHelpers.GetTextChannel(server, DiscordIds.ChannelId);
                if (_channel != null)
                {
                    _timer = new System.Threading.Timer(Check, null, 0, 1000 * PingDelaySeconds);
                }
            }
            return(Task.CompletedTask);
        }