2018-08-06 12:31:49 +02:00
|
|
|
/**
|
|
|
|
* BetterDiscord Connectivity Module
|
|
|
|
* Copyright (c) 2015-present Jiiks/JsSucks - https://github.com/Jiiks / https://github.com/JsSucks
|
|
|
|
* All rights reserved.
|
|
|
|
* https://betterdiscord.net
|
|
|
|
*
|
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
|
|
|
*/
|
|
|
|
|
|
|
|
import BdWebApi from './bdwebapi';
|
|
|
|
import { ClientLogger as Logger } from 'common';
|
|
|
|
|
|
|
|
export default class Connectivity {
|
|
|
|
|
|
|
|
static start() {
|
|
|
|
Logger.info('Connectivity', `Patching anonymous statistics`);
|
2018-08-06 16:05:36 +02:00
|
|
|
BdWebApi.statistics.patch({ themes: [], plugins: [] });
|
2018-08-06 12:31:49 +02:00
|
|
|
setInterval(() => {
|
|
|
|
Logger.info('Connectivity', `Patching anonymous statistics`);
|
2018-08-06 16:05:36 +02:00
|
|
|
BdWebApi.statistics.patch({ themes: [], plugins: [] });
|
2018-08-06 12:31:49 +02:00
|
|
|
}, 15*60*1000);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|