|
|
@@ -1,7 +1,8 @@
|
|
|
-import { TOKEN_MAP } from './const.js'
|
|
|
+import { TOKEN_MAP, SMART_WALLET } from './const.js'
|
|
|
|
|
|
const API_URL = 'https://app-byreal-table.trrlzk.easypanel.host/api/top-positions'
|
|
|
const DISCORD_WEBHOOK_URL = 'https://discord.com/api/webhooks/1449354624225120378/7gOkPXzZkaoQF7XWKFZRsevVSKXcUOuim2Rhtx_gWzBd9b7wphFMQiAIqBnRT3Gmkog4'
|
|
|
+const DISCORD_WEBHOOK_URL_SMART_WALLET = 'https://discord.com/api/webhooks/1450301829064954040/zNYc-mnYPDFgnAPLZxY40aicERwdL4TsvXk9VyiqWgyjRqJMXKIBzVHEvBiHbpbJrmtu'
|
|
|
const DEFAULT_POOL_ADDRESS = TOKEN_MAP['MON']
|
|
|
const INTERVAL_MS = 1 * 60 * 1000 // 1分钟
|
|
|
const MAX_AGE_MS = 10 * 60 * 1000 // 10分钟
|
|
|
@@ -73,6 +74,11 @@ async function sendToDiscord(position, symbol) {
|
|
|
value: `\`${position.positionAddress}\``,
|
|
|
inline: false,
|
|
|
},
|
|
|
+ {
|
|
|
+ name: '地址',
|
|
|
+ value: `https://www.byreal.io/en/portfolio?userAddress=${position.walletAddress}&tab=current&positionAddress=${position.positionAddress}`,
|
|
|
+ inline: false,
|
|
|
+ },
|
|
|
{
|
|
|
name: '交易对',
|
|
|
value: `\`${symbol}\``,
|
|
|
@@ -118,7 +124,13 @@ async function sendToDiscord(position, symbol) {
|
|
|
url: `https://www.byreal.io/en/portfolio?userAddress=${position.walletAddress}&tab=current&positionAddress=${position.positionAddress}`,
|
|
|
}
|
|
|
|
|
|
- const response = await fetch(DISCORD_WEBHOOK_URL, {
|
|
|
+ let DISCORD_WEBHOOK = SMART_WALLET.includes(position.walletAddress) ? DISCORD_WEBHOOK_URL_SMART_WALLET : DISCORD_WEBHOOK_URL
|
|
|
+
|
|
|
+ if (SMART_WALLET.includes(position.walletAddress)) {
|
|
|
+ embed.title = '💎 发现重点监控仓位'
|
|
|
+ }
|
|
|
+
|
|
|
+ const response = await fetch(DISCORD_WEBHOOK, {
|
|
|
method: 'POST',
|
|
|
headers: {
|
|
|
'content-type': 'application/json',
|