mirror of
https://github.com/TheNetsky/Microsoft-Rewards-Script.git
synced 2026-01-20 06:53:59 +00:00
1.0.5
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import axios from 'axios'
|
||||
|
||||
import { log } from './Logger'
|
||||
|
||||
import { ChromeVersion, EdgeVersion } from '../interface/UserAgentUtil'
|
||||
|
||||
export async function getUserAgent(mobile: boolean) {
|
||||
@@ -49,7 +51,7 @@ export async function getChromeVersion(): Promise<string> {
|
||||
return data.channels.Stable.version
|
||||
|
||||
} catch (error) {
|
||||
throw log('USERAGENT-CHROME-VERSION', 'An error occurred:' + error, 'error')
|
||||
throw log('USERAGENT-CHROME-VERSION', 'An error occurred:' + JSON.stringify(error, null, 2), 'error')
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,7 +75,7 @@ export async function getEdgeVersions() {
|
||||
|
||||
|
||||
} catch (error) {
|
||||
throw log('USERAGENT-EDGE-VERSION', 'An error occurred:' + error, 'error')
|
||||
throw log('USERAGENT-EDGE-VERSION', 'An error occurred:' + JSON.stringify(error, null, 2), 'error')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,9 +3,8 @@ import axios from 'axios'
|
||||
import { webhook } from '../config.json'
|
||||
|
||||
export async function Webhook(content: string) {
|
||||
if (!webhook.enabled) return
|
||||
if (webhook.url.length < 10) return
|
||||
|
||||
if (!webhook.enabled || webhook.url.length < 10) return
|
||||
|
||||
const request = {
|
||||
method: 'POST',
|
||||
url: webhook.url,
|
||||
|
||||
Reference in New Issue
Block a user