mirror of
https://github.com/fishyboteso/fishyboteso.git
synced 2024-08-30 18:32:13 +00:00
show full auto only if has beta access
This commit is contained in:
parent
7e00771887
commit
721c2ae7ce
@ -3,6 +3,7 @@ from tkinter import OptionMenu, Button, IntVar
|
||||
from typing import List, Callable, Optional
|
||||
import threading
|
||||
|
||||
from fishy.web import web
|
||||
from ttkthemes import ThemedTk
|
||||
|
||||
from fishy.engine.common.event_handler import EngineEventHandler
|
||||
@ -52,10 +53,11 @@ class GUI:
|
||||
@property
|
||||
def engines(self):
|
||||
engines = {
|
||||
"Semi Fisher": [lambda: config_top.start_semifisher_config(self), self.engine.toggle_semifisher],
|
||||
"Semi Fisher": [lambda: config_top.start_semifisher_config(self), # start config function
|
||||
self.engine.toggle_semifisher], # start engine function
|
||||
}
|
||||
|
||||
if config.get('debug', False):
|
||||
if web.has_beta():
|
||||
engines["Full-Auto Fisher"] = [lambda: config_top.start_fullfisher_config(self),
|
||||
self.engine.toggle_fullfisher]
|
||||
return engines
|
||||
|
@ -14,6 +14,7 @@ hole_depleted = domain + "/api/hole_depleted"
|
||||
session = domain + "/api/session"
|
||||
terms = domain + "/terms.html"
|
||||
discord = domain + "/api/discord"
|
||||
beta = domain + "/api/beta"
|
||||
|
||||
|
||||
def get_notification_page(uid):
|
||||
|
@ -127,3 +127,15 @@ def get_session(lazy=True):
|
||||
|
||||
_session_id = response.json()["session_id"]
|
||||
return _session_id
|
||||
|
||||
|
||||
@fallback(False)
|
||||
def has_beta():
|
||||
body = {'uid': config.get("uid")}
|
||||
response = requests.get(urls.beta, params=body)
|
||||
result = response.json()
|
||||
|
||||
if not result["success"]:
|
||||
return False
|
||||
|
||||
return response.json()["beta"]
|
||||
|
Loading…
Reference in New Issue
Block a user