diff --git a/src/config.ts b/src/config.ts index cec3e05f..a8baeb22 100644 --- a/src/config.ts +++ b/src/config.ts @@ -143,7 +143,7 @@ export default { explorerRestApiKey: process.env.EXPLORER_REST_API_KEY ?? '', swapSubgraphApiUrl: process.env.SWAP_SUBGRAPH_API_URL ?? - 'https://api.thegraph.com/subgraphs/name/nick8319/uniswap-v3-harmony' + 'https://api.thegraph.com/subgraphs/name/nick8319/uniswap-v3-harmony' // 'https://api.thegraph.com/subgraphs/name/potvik/uniswap-v3-harmony' }, walletConnect: { projectId: process.env.WALLET_CONNECT_PROJECT_ID ?? '' }, voiceTranslate: { isEnabled: Boolean(parseInt(process.env.BOT_VOICE_TRANSLATE_ENABLE ?? '0')) }, diff --git a/src/modules/errorhandler.ts b/src/modules/errorhandler.ts index 4aa253b7..ca7d8322 100644 --- a/src/modules/errorhandler.ts +++ b/src/modules/errorhandler.ts @@ -72,6 +72,10 @@ class ErrorHandler { await sendMessage(ctx, e.message).catch(async (e) => { await this.onError(ctx, e, retryCount - 1, logger) }) ctx.transient.analytics.actualResponseTime = now() onStop && await onStop(ctx) + } else if (e.code === 'content_policy_violation') { + await sendMessage(ctx, e.message).catch(async (e) => { await this.onError(ctx, e, retryCount - 1, logger) }) + ctx.transient.analytics.actualResponseTime = now() + onStop && await onStop(ctx) } else { await sendMessage( ctx,