[Change] 将'Proxy', 'CookieStore'转移到BotGlobal类;

This commit is contained in:
2020-06-04 15:54:52 +08:00
parent 749b89e668
commit 4318869846
5 changed files with 51 additions and 26 deletions

View File

@ -4,7 +4,6 @@ import com.google.common.base.Strings;
import com.google.common.base.Throwables;
import com.google.gson.*;
import io.netty.handler.codec.http.HttpHeaderNames;
import net.lamgc.cgj.Main;
import net.lamgc.cgj.bot.boot.BotGlobal;
import net.lamgc.cgj.bot.cache.*;
import net.lamgc.cgj.bot.event.BufferMessageEvent;
@ -37,9 +36,10 @@ import java.util.concurrent.atomic.AtomicInteger;
@SuppressWarnings({"SynchronizationOnLocalVariableOrMethodParameter", "SameParameterValue"})
public class BotCommandProcess {
private final static PixivDownload pixivDownload = new PixivDownload(Main.cookieStore, Main.proxy);
private final static PixivDownload pixivDownload =
new PixivDownload(BotGlobal.getGlobal().getCookieStore(), BotGlobal.getGlobal().getProxy());
private final static Logger log = LoggerFactory.getLogger(BotCommandProcess.class.getName());
private final static Logger log = LoggerFactory.getLogger(BotCommandProcess.class);
private final static File imageStoreDir = new File(BotGlobal.getGlobal().getDataStoreDir(), "data/image/cgj/");
private final static Gson gson = new GsonBuilder()