Skip to content

Commit 18826f2

Browse files
committed
feat: perms
1 parent c7b7f54 commit 18826f2

File tree

8 files changed

+63
-34
lines changed

8 files changed

+63
-34
lines changed
1.05 KB
Binary file not shown.
0 Bytes
Binary file not shown.
3.78 KB
Binary file not shown.

blockchain_job.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,9 @@ def schedule_hash_power_job(client, loop):
140140
# Initialize the scheduler
141141
scheduler = BackgroundScheduler()
142142

143-
# Add the job to post hash power every hour
143+
# Add the job to post hash power every 3 hours
144144
scheduler.add_job(lambda: loop.create_task(post_hash_power(client)),
145-
CronTrigger.from_crontab('0 * * * *'))
145+
CronTrigger.from_crontab('0 */3 * * *'))
146146

147147
# Start the scheduler
148148
scheduler.start()

customer_analysis_job.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,29 @@ async def run_customer_service_analysis(telegram_client, target_group_id=None, h
288288
analysis_hours = hours if hours is not None else ANALYSIS_HOURS
289289

290290
try:
291+
# Check if phone number is available for user authentication
292+
import os
293+
phone_number = os.getenv('TELEGRAM_PHONE_NUMBER')
294+
if not phone_number:
295+
logging.warning("TELEGRAM_PHONE_NUMBER not configured - customer analysis requires user account access")
296+
no_auth_msg = f"""
297+
🔍 **Customer Service Analysis - {datetime.now().strftime('%Y-%m-%d %H:%M UTC')}**
298+
299+
⚠️ **Analysis Unavailable**
300+
Customer service analysis requires a Telegram user account to read channel history.
301+
Bot accounts cannot access historical messages from channels.
302+
303+
**To enable this feature:**
304+
• Configure TELEGRAM_PHONE_NUMBER environment variable
305+
• Ensure the user account has access to the analyzed channels
306+
307+
**Current Configuration:**
308+
• Analysis would cover: {', '.join(ANALYSIS_CHANNELS)}
309+
• Time period: Last {analysis_hours} hours
310+
"""
311+
await send_message_to_group(telegram_client, no_auth_msg, target_group_id)
312+
return
313+
291314
logging.info(f"Starting customer service analysis for last {analysis_hours} hours...")
292315

293316
# Use the archiver to get recent messages

faqqer_bot.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from telethon.tl.types import Channel
1616

1717
# FAQQer Bot Version
18-
FAQQER_VERSION = "1.2.0"
18+
FAQQER_VERSION = "1.2.2"
1919
BUILD_DATE = "2025-05-31"
2020

2121
# Load environment variables from the .env file
@@ -291,6 +291,10 @@ async def version_handler(event):
291291
# Get current timestamp for runtime info
292292
current_time = datetime.now().strftime("%Y-%m-%d %H:%M:%S UTC")
293293

294+
# Check if customer analysis is available
295+
phone_number = os.getenv('TELEGRAM_PHONE_NUMBER')
296+
analysis_status = "✅ Available" if phone_number else "⚠️ Requires TELEGRAM_PHONE_NUMBER"
297+
294298
version_info = f"""
295299
🤖 **FAQQer Bot Version Information**
296300
@@ -302,7 +306,7 @@ async def version_handler(event):
302306
• FAQ answering with OpenAI GPT-4o
303307
• Hash rate monitoring
304308
• Periodic FAQ content refresh
305-
• Customer service analysis
309+
• Customer service analysis: {analysis_status}
306310
• Multi-source FAQ loading (local + remote)
307311
308312
**Commands:**

temp_analysis/combined_channel_history.txt

Lines changed: 32 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,8 @@
11
Combined Chat History for channels: tariproject, OrderOfSoon
22
Time period: Last 3 hours
3-
Generated on: 2025-05-31 14:19:48 UTC
3+
Generated on: 2025-05-31 14:56:29 UTC
44
======================================================================
55

6-
Channel: tariproject | User: None | Date: 2025-05-31 11:23:00
7-
Message: На винде запустил один комп с тари, синхронизация прошла майнит, на второй поставил программу и скопировал туда адрес и секретные слова, но синхронизация не проходит, что делаю не так?
8-
--------------------------------------------------
9-
Channel: tariproject | User: None | Date: 2025-05-31 11:23:11
10-
Message: can I bridge with the console wallet?
11-
--------------------------------------------------
12-
Channel: tariproject | User: None | Date: 2025-05-31 11:29:48
13-
Message: well yea, knowing that part, but what I rather meant is the communication protocol between miner soft and pool / node :) (Replying to: Unknown message)
14-
--------------------------------------------------
15-
Channel: tariproject | User: None | Date: 2025-05-31 11:38:58
16-
Message: Universe says in progress (Replying to: Unknown message)
17-
--------------------------------------------------
18-
Channel: tariproject | User: None | Date: 2025-05-31 11:42:09
19-
Message: The person 13 posts above yours hit block 17331 (Replying to: Unknown message)
20-
--------------------------------------------------
21-
Channel: OrderOfSoon | User: Infokeeper | Date: 2025-05-31 11:43:54
22-
Message: Hello!
23-
Is there any option in the program to set the path for it's data?
24-
I have created a link and it works, but it would be nice to set this path in the app it self. I run out of space and I had to search for the app path...
25-
--------------------------------------------------
26-
Channel: tariproject | User: None | Date: 2025-05-31 11:43:58
27-
Message: Can I use my node address in xmrig?
28-
--------------------------------------------------
29-
Channel: tariproject | User: None | Date: 2025-05-31 11:44:46
30-
Message: Will it work and will my balance update 🧐
31-
--------------------------------------------------
32-
Channel: tariproject | User: None | Date: 2025-05-31 11:53:04
33-
Message: Project have a faucet??
34-
--------------------------------------------------
356
Channel: tariproject | User: None | Date: 2025-05-31 11:58:52
367
Message: Hatchling pool says no blocks 60 mins already, but in block explorer there are blocks. What's going on?
378
--------------------------------------------------
@@ -280,3 +251,34 @@ Message: ? It won a block like 20 mins ago or sooner? Payouts are a little delay
280251
Channel: tariproject | User: None | Date: 2025-05-31 14:12:40
281252
Message: Can anyone help me with a stuck bridge TX?
282253
--------------------------------------------------
254+
Channel: tariproject | User: None | Date: 2025-05-31 14:19:54
255+
Message: Same
256+
--------------------------------------------------
257+
Channel: tariproject | User: efaykue_bot | Date: 2025-05-31 14:28:31
258+
Message: Please provide a specific question or topic you would like information on. You can use the format '/faq <type your question inline>'. For example, '/faq What is Tari Universe?'.
259+
--------------------------------------------------
260+
Channel: tariproject | User: None | Date: 2025-05-31 14:31:17
261+
Message: /faq where can I find base-node-gprc-address linux PC I'm using!
262+
--------------------------------------------------
263+
Channel: tariproject | User: efaykue_bot | Date: 2025-05-31 14:31:21
264+
Message: The base node gRPC address can typically be found in the configuration file of the Tari software on your Linux PC. This file is usually named `config.toml` and is located in the Tari directory, often under `~/.tari/`. You can open this file with a text editor to find and modify the gRPC address settings. If you need further assistance, please refer to the installation instructions at https://github.com/tari-project/tari/ or contact support staff. (Replying to: /faq where can I find base-node-gprc-address linux PC I'm using!)
265+
--------------------------------------------------
266+
Channel: tariproject | User: None | Date: 2025-05-31 14:31:23
267+
Message: Hey guys I have 2 questions.
268+
269+
1) why are there 2 tari groups on my telegram, is one fake?
270+
271+
2) I dont have a gpu in my machine. Is cpu only worthwhile or am I wasting my time?
272+
--------------------------------------------------
273+
Channel: tariproject | User: None | Date: 2025-05-31 14:33:45
274+
Message: Guys is there a guode on how to bridge to wxtm
275+
--------------------------------------------------
276+
Channel: tariproject | User: None | Date: 2025-05-31 14:46:35
277+
Message: GPUs are several orders of magnitude more powerful at hashing than CPUs, but I'm also unsure if the Tari award rate is strictly based on hash rate
278+
279+
for example, one of my nodes is doing 2.6k h/s on CPU while the GPU is doing 538**m** h/s or ~207,000x faster (Replying to: Hey guys I have 2 questions.
280+
281+
1) why are there 2 tari groups on my telegram, is one fake?
282+
283+
2) I dont have a gpu in my machine. Is cpu only worthwhile or am I wasting my time?)
284+
--------------------------------------------------

test_bot.session

28 KB
Binary file not shown.

0 commit comments

Comments
 (0)