mirror of
https://github.com/TeamPGM/PagerMaid-Pyro.git
synced 2024-11-16 09:38:58 +00:00
🔧 Update Sentry DSN
This commit is contained in:
parent
6609f91ce8
commit
9af014c6b7
@ -33,7 +33,8 @@ timezone: "Asia/ShangHai"
|
||||
|
||||
# In-Chat logging settings, default settings logs directly into Kat, strongly advised to change
|
||||
log: "False"
|
||||
log_chatid: "503691334"
|
||||
# chat id of the log group, such as -1001234567890, also can use username, such as "telegram"
|
||||
log_chatid: "me"
|
||||
|
||||
# Disabled Built-in Commands
|
||||
disabled_cmd:
|
||||
@ -73,6 +74,8 @@ ipv6: "False"
|
||||
|
||||
# Analytics
|
||||
allow_analytic: "True"
|
||||
sentry_api: ""
|
||||
mixpanel_api: ""
|
||||
|
||||
# Speed_test cli path
|
||||
speed_test_path: ""
|
||||
|
@ -42,6 +42,7 @@ class Config:
|
||||
API_ID = int(os.environ.get("API_ID", config["api_id"]))
|
||||
API_HASH = os.environ.get("API_HASH", config["api_hash"])
|
||||
except (ValueError, KeyError):
|
||||
print("[Error] API_ID or API_HASH is invalid, use the default value.")
|
||||
# TGX
|
||||
API_ID = DEFAULT_API_ID
|
||||
API_HASH = DEFAULT_API_HASH
|
||||
@ -63,14 +64,16 @@ class Config:
|
||||
)
|
||||
TTS = os.environ.get("PGM_TTS", config["application_tts"])
|
||||
LOG = strtobool(os.environ.get("PGM_LOG", config["log"]))
|
||||
LOG_ID = int(os.environ.get("PGM_LOG_ID", config["log_chatid"]))
|
||||
LOG_ID = os.environ.get("PGM_LOG_ID", config["log_chatid"])
|
||||
IPV6 = strtobool(os.environ.get("PGM_IPV6", config["ipv6"]))
|
||||
ALLOW_ANALYTIC = strtobool(
|
||||
os.environ.get("PGM_ALLOW_ANALYTIC", config["allow_analytic"]), True
|
||||
)
|
||||
SENTRY_API = (
|
||||
"https://2e13a517aeb542e7a307cba8996b6d1a@o1342815.ingest.sentry.io/6617119"
|
||||
)
|
||||
SENTRY_API = os.environ.get("SENTRY_API", config.get("sentry_api", ""))
|
||||
if not SENTRY_API:
|
||||
SENTRY_API = "https://79584904859c93d48dbc71d73e76a51a@o416616.ingest.sentry.io/4506478732443653"
|
||||
MIXPANEL_API = os.environ.get("MIXPANEL_API", config.get("mixpanel_api"))
|
||||
if not MIXPANEL_API:
|
||||
MIXPANEL_API = "c79162511383b0fa1e9c062a2a86c855"
|
||||
TIME_FORM = os.environ.get("PGM_TIME_FORM", config["time_form"])
|
||||
DATE_FORM = os.environ.get("PGM_DATE_FORM", config["date_form"])
|
||||
|
@ -58,6 +58,8 @@ async def sentry_init_id(bot: Client):
|
||||
|
||||
@Hook.process_error()
|
||||
async def sentry_report(message: Message, command, exc_info, **_):
|
||||
if not Config.ERROR_REPORT:
|
||||
return
|
||||
sender_id = message.from_user.id if message.from_user else ""
|
||||
sender_id = message.sender_chat.id if message.sender_chat else sender_id
|
||||
sentry_sdk.set_context(
|
||||
|
Loading…
Reference in New Issue
Block a user