From ce5ddfa909eaee9038d9224d4393bb9071b91767 Mon Sep 17 00:00:00 2001 From: bnonni Date: Tue, 22 Aug 2023 21:00:44 -0400 Subject: [PATCH 1/8] change test --- src/atl_bitlab_bot.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/atl_bitlab_bot.py b/src/atl_bitlab_bot.py index 6f2929b0..60e6c116 100644 --- a/src/atl_bitlab_bot.py +++ b/src/atl_bitlab_bot.py @@ -362,10 +362,10 @@ async def help(update: Update, context: ContextTypes.DEFAULT_TYPE): f"[{now}] {PROGRAM}: /help executed by {update.effective_message.from_user.username}" ) message_text = update.message.text - if f"@{BOT_HANDLE}" not in message_text: + if f"{BOT_HANDLE}" not in message_text: return await context.bot.send_message( chat_id=update.effective_chat.id, - text=f"If you want to start @{BOT_HANDLE}, please tag the bot in the start command: e.g. `/help @{BOT_HANDLE}`", + text=f"If you want to start {BOT_HANDLE}, please tag the bot in the start command: e.g. `/help {BOT_HANDLE}`", ) await context.bot.send_message( chat_id=update.effective_chat.id, @@ -376,10 +376,10 @@ async def help(update: Update, context: ContextTypes.DEFAULT_TYPE): async def start(update: Update, context: ContextTypes.DEFAULT_TYPE): sender = update.effective_message.from_user.username message_text = update.message.text - if f"@{BOT_HANDLE}" not in message_text: + if f"{BOT_HANDLE}" not in message_text: return await context.bot.send_message( chat_id=update.effective_chat.id, - text=f"If you want to start @{BOT_HANDLE}, please tag the bot in the start command: e.g. `/start @{BOT_HANDLE}`", + text=f"If you want to start {BOT_HANDLE}, please tag the bot in the start command: e.g. `/start {BOT_HANDLE}`", ) debug(f"[{now}] {PROGRAM}: /start executed by {sender}") if sender not in WHITELIST: @@ -397,8 +397,8 @@ async def start(update: Update, context: ContextTypes.DEFAULT_TYPE): def bot_main(DEV_MODE): global BOT_HANDLE - BOT_HANDLE = f"Test{BOT_HANDLE}" if DEV_MODE else BOT_HANDLE - debug(f"[{now}] {PROGRAM}: @{BOT_HANDLE} Initialized") + BOT_HANDLE = f"test_{BOT_HANDLE}" if DEV_MODE else BOT_HANDLE + debug(f"[{now}] {PROGRAM}: {BOT_HANDLE} Initialized") start_handler = CommandHandler("start", start) application.add_handler(start_handler) help_handler = CommandHandler("help", help) @@ -415,5 +415,5 @@ def bot_main(DEV_MODE): application.add_handler(clean_summary_handler) message_handler = MessageHandler(BaseFilter(), handle_message) application.add_handler(message_handler) - debug(f"[{now}] {PROGRAM}: @{BOT_HANDLE} Polling") + debug(f"[{now}] {PROGRAM}: {BOT_HANDLE} Polling") application.run_polling() From 588b57627c3a080f22c32ca4905e83851055b382 Mon Sep 17 00:00:00 2001 From: bnonni Date: Tue, 22 Aug 2023 21:10:34 -0400 Subject: [PATCH 2/8] update --- src/atl_bitlab_bot.py | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/atl_bitlab_bot.py b/src/atl_bitlab_bot.py index 60e6c116..c8b05204 100644 --- a/src/atl_bitlab_bot.py +++ b/src/atl_bitlab_bot.py @@ -24,7 +24,7 @@ from lib.logger import debug from lib.utils import qr_code from lib.api.strike import Strike -from lib.env import TELEGRAM_BOT_TOKEN, OPENAI_API_KEY, BOT_HANDLE +from lib.env import TEST_TELEGRAM_BOT_TOKEN, TELEGRAM_BOT_TOKEN, OPENAI_API_KEY, BOT_HANDLE from help_menu import help_menu_message import openai @@ -40,7 +40,6 @@ MESSAGES_PY_FILE = os.path.abspath("data/backup/messages.py") PROMPTS_BY_DAY_FILE = os.path.abspath("data/backup/prompts_by_day.py") openai.api_key = OPENAI_API_KEY -application = ApplicationBuilder().token(TELEGRAM_BOT_TOKEN).build() now = datetime.now() now_iso = now.isoformat() now_iso_clean = now_iso.split("+")[0].split("T")[0] @@ -398,22 +397,24 @@ async def start(update: Update, context: ContextTypes.DEFAULT_TYPE): def bot_main(DEV_MODE): global BOT_HANDLE BOT_HANDLE = f"test_{BOT_HANDLE}" if DEV_MODE else BOT_HANDLE + BOT_TOKEN = TEST_TELEGRAM_BOT_TOKEN if DEV_MODE else TELEGRAM_BOT_TOKEN + APPLICATION = ApplicationBuilder().token(BOT_TOKEN).build() debug(f"[{now}] {PROGRAM}: {BOT_HANDLE} Initialized") start_handler = CommandHandler("start", start) - application.add_handler(start_handler) + APPLICATION.add_handler(start_handler) help_handler = CommandHandler("help", help) - application.add_handler(help_handler) + APPLICATION.add_handler(help_handler) stop_handler = CommandHandler("stop", stop) - application.add_handler(stop_handler) + APPLICATION.add_handler(stop_handler) summary_handler = CommandHandler("summary", summary) - application.add_handler(summary_handler) + APPLICATION.add_handler(summary_handler) prompt_handler = CommandHandler("prompt", atl_bitlab_bot) - application.add_handler(prompt_handler) + APPLICATION.add_handler(prompt_handler) clean_handler = CommandHandler("clean", clean) - application.add_handler(clean_handler) + APPLICATION.add_handler(clean_handler) clean_summary_handler = CommandHandler("both", both) - application.add_handler(clean_summary_handler) + APPLICATION.add_handler(clean_summary_handler) message_handler = MessageHandler(BaseFilter(), handle_message) - application.add_handler(message_handler) + APPLICATION.add_handler(message_handler) debug(f"[{now}] {PROGRAM}: {BOT_HANDLE} Polling") - application.run_polling() + APPLICATION.run_polling() From 37718ec5e40fdca6a1437949f60a07a0b34cf4d1 Mon Sep 17 00:00:00 2001 From: bnonni Date: Tue, 22 Aug 2023 21:22:18 -0400 Subject: [PATCH 3/8] updates --- src/atl_bitlab_bot.py | 14 +++++++------- src/data/debug.log | 10 ++++++++++ 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/src/atl_bitlab_bot.py b/src/atl_bitlab_bot.py index c8b05204..ddaffb75 100644 --- a/src/atl_bitlab_bot.py +++ b/src/atl_bitlab_bot.py @@ -361,10 +361,10 @@ async def help(update: Update, context: ContextTypes.DEFAULT_TYPE): f"[{now}] {PROGRAM}: /help executed by {update.effective_message.from_user.username}" ) message_text = update.message.text - if f"{BOT_HANDLE}" not in message_text: + if f"@{BOT_HANDLE}" not in message_text: return await context.bot.send_message( chat_id=update.effective_chat.id, - text=f"If you want to start {BOT_HANDLE}, please tag the bot in the start command: e.g. `/help {BOT_HANDLE}`", + text=f"If you want to start @{BOT_HANDLE}, please tag the bot in the start command: e.g. `/help @{BOT_HANDLE}`", ) await context.bot.send_message( chat_id=update.effective_chat.id, @@ -375,10 +375,10 @@ async def help(update: Update, context: ContextTypes.DEFAULT_TYPE): async def start(update: Update, context: ContextTypes.DEFAULT_TYPE): sender = update.effective_message.from_user.username message_text = update.message.text - if f"{BOT_HANDLE}" not in message_text: + if f"@{BOT_HANDLE}" not in message_text: return await context.bot.send_message( chat_id=update.effective_chat.id, - text=f"If you want to start {BOT_HANDLE}, please tag the bot in the start command: e.g. `/start {BOT_HANDLE}`", + text=f"If you want to start @{BOT_HANDLE}, please tag the bot in the start command: e.g. `/start @{BOT_HANDLE}`", ) debug(f"[{now}] {PROGRAM}: /start executed by {sender}") if sender not in WHITELIST: @@ -396,10 +396,10 @@ async def start(update: Update, context: ContextTypes.DEFAULT_TYPE): def bot_main(DEV_MODE): global BOT_HANDLE - BOT_HANDLE = f"test_{BOT_HANDLE}" if DEV_MODE else BOT_HANDLE + BOT_HANDLE = f"test_{BOT_HANDLE}" if DEV_MODE else f"{BOT_HANDLE}" BOT_TOKEN = TEST_TELEGRAM_BOT_TOKEN if DEV_MODE else TELEGRAM_BOT_TOKEN APPLICATION = ApplicationBuilder().token(BOT_TOKEN).build() - debug(f"[{now}] {PROGRAM}: {BOT_HANDLE} Initialized") + debug(f"[{now}] {PROGRAM}: @{BOT_HANDLE} Initialized") start_handler = CommandHandler("start", start) APPLICATION.add_handler(start_handler) help_handler = CommandHandler("help", help) @@ -416,5 +416,5 @@ def bot_main(DEV_MODE): APPLICATION.add_handler(clean_summary_handler) message_handler = MessageHandler(BaseFilter(), handle_message) APPLICATION.add_handler(message_handler) - debug(f"[{now}] {PROGRAM}: {BOT_HANDLE} Polling") + debug(f"[{now}] {PROGRAM}: @{BOT_HANDLE} Polling") APPLICATION.run_polling() diff --git a/src/data/debug.log b/src/data/debug.log index f27942b5..4a4b11d0 100644 --- a/src/data/debug.log +++ b/src/data/debug.log @@ -6790,3 +6790,13 @@ https://ronindojo.io/en/roninmobile [2023-08-11 12:57:42.168880] atl_bitlab_bot.py: /summary executed by nonni_io [2023-08-11 12:57:42.168880] atl_bitlab_bot.py: /summary executed [2023-08-11 12:57:42.168880] atl_bitlab_bot.py: Prompts by day = {"2023-08-04": "", "2023-08-05": "", "2023-08-06": "", "2023-08-07": "", "2023-08-08": "Summarize the key points in this text. Separate the key points with an empty line, another line with 10 equal signs, and then another empty line. \n\nHODLBarbarian said https://seedhammer.com/ on 2023-08-08\n", "2023-08-09": "Summarize the key points in this text. Separate the key points with an empty line, another line with 10 equal signs, and then another empty line. \n\nClockworkKat said https://simplex.chat/contact#/?v=1-4&smp=smp%3A%2F%2Fhejn2gVIqNU6xjtGM3OwQeuk8ZEbDXVJXAlnSBJBWUA%3D%40smp16.simplex.im%2FYPHjqQwLMvYgbCAsn4EhvgoP0ugE_1Dv%23%2F%3Fv%3D1-2%26dh%3DMCowBQYDK2VuAyEAhFsmXCQTlxqvCcNyYq-VaRTuxD48ZwnTNUbLuw7ccBk%253D%26srv%3Dp3ktngodzi6qrf7w64mmde3syuzrv57y55hxabqcq3l5p6oi7yzze6qd.onion&data=%7B%22type%22%3A%22group%22%2C%22groupLinkId%22%3A%22d7g7c15p6Jwdl0PhXLssEw%3D%3D%22%7D on 2023-08-09\njordan_bravo said Request sent on 2023-08-09\nClockworkKat said \ud83d\udc4b on 2023-08-09\njordan_bravo said Is there a BitDevs or BitPlebs the upcoming Wednesday (Aug 16)? on 2023-08-09\nHODLBarbarian said Yes, were going to have a Plebs. Next session with Mike tidwell on Genesis book on 2023-08-09\nHODLBarbarian said I need to put it in meet up on 2023-08-09\nHODLBarbarian said https://www.meetup.com/atlanta-bitplebs/events/295341756?utm_medium=email&utm_source=sendgrid&utm_campaign=event_announce_en on 2023-08-09\nHODLBarbarian said @miketwenty1 FYI on 2023-08-09\nsbddesign said \u26cf\ufe0f Tonights the night! Mining facility tour at Cleanspark in Nocross. If you signed up in advanced, you should have gotten an email from the BitDevs protonmail account or through meetup.com with address and parking info. See you there! https://www.meetup.com/atlantabitdevs/events/294868473/ on 2023-08-09\nsbddesign said \u26cf\ufe0f Tonights the night! Mining facility tour at Cleanspark in Nocross. If you signed up in advanced, you should have gotten an email from the BitDevs protonmail account or through meetup.com with address and parking info. See you there! https://www.meetup.com/atlantabitdevs/events/294868473/ on 2023-08-09\nLipsi_17 said Can anyone share where I can find the content ( video and reading) we went through in the last 2 meet ups. This would help me brush up before we do the tour this evening. Thanks in advance on 2023-08-09\nsbddesign said Heres the content from last weeks Stratum V2 discussion: https://atlbit.dev/events/2023-08-02-stratum-v2-bitcoin-mining-reading-group on 2023-08-09\nsbddesign said And here is the video we watched the week before that which talks about how mining works: https://youtu.be/6vQB3XGB7ig on 2023-08-09\nHODLBarbarian said @miketwenty1 FYI on 2023-08-09\nClockworkKat said Think Im here on 2023-08-09\ntanyasinthemetaverse said Same! on 2023-08-09\ntanyasinthemetaverse said Gonna chill in the car until everyone gets here on 2023-08-09\nTwoPhlyTwo said Just arrived on 2023-08-09\nndgoHODL said It\u2019s the door on the right corner of the building btw on 2023-08-09\njf1tt said ETA 6:07 I\u2019m hustling! \ud83d\ude05 on 2023-08-09\nnonni_io said What happens if we\u2019re 40 min late \ud83d\ude02 on 2023-08-09\nnonni_io said What happens if im 40 min late \ud83d\ude02 on 2023-08-09\nnonni_io said Do I gotta RBF my way in? on 2023-08-09\nsbddesign said Not sure on 2023-08-09\nsbddesign said You need to go to security on 2023-08-09\nnonni_io said Sounds good on 2023-08-09\nsbddesign said \ud83c\udf54 Our after dinner hang is B&W Burger near Cleanspark in Norcross: B&W Burgers, Buns & Brews\n(470) 359-7896\nhttps://maps.app.goo.gl/ETAkwbqEyteXb4vGA?g_st=ic on 2023-08-09\n", "2023-08-10": "Summarize the key points in this text. Separate the key points with an empty line, another line with 10 equal signs, and then another empty line. \n\njf1tt said There\u2019s a rooftop here. They\u2019re putting some tables together for a group. Can also eat downstairs if you prefer on 2023-08-10\njf1tt said First bunch of us are up here on 2023-08-10\nLipsi_17 said I have never been to a gold mining site. But I visited a bitcoin mining site today. Considering Bitcoin is digital gold I can say now that I enjoyed the digital gold mining site at Cleanspark. Having worked in a Data Centres space for 1.5 yrs, it all looked very familiar to me and made sense. \nThanks Stephen for putting so much of your time and effort from your daily job to make it possible for all the ATL bitcoin community to experience digital gold mining. on 2023-08-10\naidalop21 said Yessss. This was great!!! @sbddesign thanks on 2023-08-10\npacketprotector said /send 1337 @sbddesign Thanks for putting together the tour! Such a great experience and a huge turnout! The CleanSpark peeps are awesome! on 2023-08-10\naidalop21 said Did anyone by any chance count the amount of people that showed up today to cleanspark? on 2023-08-10\nnitesh_btc said I have the count to number of people who showed up at the bar. Its 24 \ud83d\ude01 on 2023-08-10\narshmolu said had a great time, thanks for putting this together @sbddesign \ud83e\udec2 on 2023-08-10\nHODLBarbarian said Great field trip. Super awesome time, @sbddesign on 2023-08-10\nTwoPhlyTwo said +1 awesome on 2023-08-10\nsbddesign said It was great seeing everyone last night at Cleanspark! Im glad to hear everyone enjoyed it. Real credit goes to Craig and the Cleanspark crew, Im glad they shared their time with us and were open minded to the idea of bringing a huge group of people they had never met into a secure data center. on 2023-08-10\narshmolu said had a great time, thanks for putting this together @sbddesign \ud83e\udec2 on 2023-08-10\nsbddesign said /tip@LightningTipBot on 2023-08-10\nsbddesign said /send 1111 @ndgoHODL nice work with the crazy super circuitry microscope on 2023-08-10\nJaey0ung said /send on 2023-08-10\nnitesh_btc said Tell them not to check the security cameras. I stuck my hand in the oil and pulled some coins out. on 2023-08-10\naidalop21 said Did you apply the BTC oily lotion to your hands? on 2023-08-10\naidalop21 said Did you apply the BTC oily lotion to your hands? on 2023-08-10\nnitesh_btc said No I just rubbed it on to Lipsis hands after I stole the coils on 2023-08-10\nnitesh_btc said No I just rubbed it on to Lipsis hands after I stole the coins on 2023-08-10\nsbddesign said Using bitcoin miner immersion oil is the most natural, healthy way to moisturize. All other forms of lotion are a by-product of our fiat system. on 2023-08-10\nnitesh_btc said This \u261d\ufe0f on 2023-08-10\nsbddesign said Using bitcoin miner immersion oil is the most natural, healthy way to moisturize. All other forms of lotion are a by-product of our fiat system. on 2023-08-10\nnitesh_btc said No I just rubbed it on to Lipsis hands after I stole the coins on 2023-08-10\nLipsi_17 said Thats the reason my right hands dry skin feels over moisturized until today even after taking a shower. \n\nBut I will still not switch from ghee to miner immersion oil \ud83d\udee2\ufe0f \ud83d\ude09. Need stronger reasons to switch on 2023-08-10\njordan_bravo said Does anyone have suggestions for where to go tomorrow? on 2023-08-10\nsbddesign said Yes on 2023-08-10\nsbddesign said https://www.vicsandwich.com/ on 2023-08-10\nsbddesign said https://lafondaatlanta.com/ on 2023-08-10\nsbddesign said https://newrealmbrewing.com/ on 2023-08-10\nsbddesign said https://bantampubo4w.com/ on 2023-08-10\nsbddesign said https://bantampubo4w.com/atlanta-old-fourth-ward-bantam-pub-food-menu on 2023-08-10\n"} +[2023-08-22 21:13:12.149697] atl_bitlab_bot.py: test_@atl_bitlab_bot Initialized +[2023-08-22 21:13:12.149697] atl_bitlab_bot.py: test_@atl_bitlab_bot Polling +[2023-08-22 21:13:34.685665] atl_bitlab_bot.py: test_atl_bitlab_bot Initialized +[2023-08-22 21:13:34.685665] atl_bitlab_bot.py: test_atl_bitlab_bot Polling +[2023-08-22 21:14:53.562417] atl_bitlab_bot.py: @@test_atl_bitlab_bot Initialized +[2023-08-22 21:14:53.562417] atl_bitlab_bot.py: @@test_atl_bitlab_bot Polling +[2023-08-22 21:15:39.092116] atl_bitlab_bot.py: @test_atl_bitlab_bot Initialized +[2023-08-22 21:15:39.092116] atl_bitlab_bot.py: @test_atl_bitlab_bot Polling +[2023-08-22 21:22:04.586470] atl_bitlab_bot.py: @test_atl_bitlab_bot Initialized +[2023-08-22 21:22:04.586470] atl_bitlab_bot.py: @test_atl_bitlab_bot Polling From e8dcd8b7b6e7705106e95141823ed6194496dd63 Mon Sep 17 00:00:00 2001 From: bnonni Date: Tue, 22 Aug 2023 21:24:30 -0400 Subject: [PATCH 4/8] fix --- src/atl_bitlab_bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/atl_bitlab_bot.py b/src/atl_bitlab_bot.py index ddaffb75..d508e6fb 100644 --- a/src/atl_bitlab_bot.py +++ b/src/atl_bitlab_bot.py @@ -396,7 +396,7 @@ async def start(update: Update, context: ContextTypes.DEFAULT_TYPE): def bot_main(DEV_MODE): global BOT_HANDLE - BOT_HANDLE = f"test_{BOT_HANDLE}" if DEV_MODE else f"{BOT_HANDLE}" + BOT_HANDLE = f"test_{BOT_HANDLE}" if DEV_MODE else BOT_HANDLE BOT_TOKEN = TEST_TELEGRAM_BOT_TOKEN if DEV_MODE else TELEGRAM_BOT_TOKEN APPLICATION = ApplicationBuilder().token(BOT_TOKEN).build() debug(f"[{now}] {PROGRAM}: @{BOT_HANDLE} Initialized") From fdd397aa546d0e1de76476ba83a38d725c3e2e50 Mon Sep 17 00:00:00 2001 From: bnonni Date: Tue, 22 Aug 2023 21:26:46 -0400 Subject: [PATCH 5/8] minor edit --- src/atl_bitlab_bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/atl_bitlab_bot.py b/src/atl_bitlab_bot.py index d508e6fb..84d6ee1d 100644 --- a/src/atl_bitlab_bot.py +++ b/src/atl_bitlab_bot.py @@ -378,7 +378,7 @@ async def start(update: Update, context: ContextTypes.DEFAULT_TYPE): if f"@{BOT_HANDLE}" not in message_text: return await context.bot.send_message( chat_id=update.effective_chat.id, - text=f"If you want to start @{BOT_HANDLE}, please tag the bot in the start command: e.g. `/start @{BOT_HANDLE}`", + text=f"If you want to start @{BOT_HANDLE}, please tag the bot in the start command: e.g. /start @{BOT_HANDLE}", ) debug(f"[{now}] {PROGRAM}: /start executed by {sender}") if sender not in WHITELIST: From 9d6c863091f55a762fdf9646b224386d8015b676 Mon Sep 17 00:00:00 2001 From: bryan Date: Wed, 23 Aug 2023 01:28:33 +0000 Subject: [PATCH 6/8] abbot server changes --- abbot.service | 29 +++++++++++++++++++++++++++++ src/data/debug.log | 8 ++++++++ start.sh | 4 ++-- 3 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 abbot.service diff --git a/abbot.service b/abbot.service new file mode 100644 index 00000000..ff2c988b --- /dev/null +++ b/abbot.service @@ -0,0 +1,29 @@ +[Unit] +Description=ATL BitLab Bot +Documentation=https://github.com/ATLBitLab/telegram-gpt-bot + +After=network-online.target +Wants=network-online.target + +[Service] +Environment=HOME=/home/bryan + +WorkingDir=/home/bryan/telegram-gpt-bot +ExecStart=/home/bryan/telegram-gpt-bot/start.sh + +Restart=always +RestartSec=10 + +StandardOutput=/home/bryan/telegram-gpt-bot/src/data/runtime.log +StandardError=/home/bryan/telegram-gpt-bot/src/data/debug.log + +SyslogIdentifier=atlbitlab-bot + +User=bryan +Group=bryan + +RuntimeDirectory=bitcoind +RuntimeDirectoryMode=0710 + +[Install] +WantedBy=multi-user.target diff --git a/src/data/debug.log b/src/data/debug.log index 4a4b11d0..70a21513 100644 --- a/src/data/debug.log +++ b/src/data/debug.log @@ -6800,3 +6800,11 @@ https://ronindojo.io/en/roninmobile [2023-08-22 21:15:39.092116] atl_bitlab_bot.py: @test_atl_bitlab_bot Polling [2023-08-22 21:22:04.586470] atl_bitlab_bot.py: @test_atl_bitlab_bot Initialized [2023-08-22 21:22:04.586470] atl_bitlab_bot.py: @test_atl_bitlab_bot Polling +[2023-08-23 01:23:11.330072] atl_bitlab_bot.py: @test_@atl_bitlab_bot Initialized +[2023-08-23 01:23:11.330072] atl_bitlab_bot.py: @test_@atl_bitlab_bot Polling +[2023-08-23 01:23:19.522686] atl_bitlab_bot.py: @test_@atl_bitlab_bot Initialized +[2023-08-23 01:23:19.522686] atl_bitlab_bot.py: @test_@atl_bitlab_bot Polling +[2023-08-23 01:25:05.219718] atl_bitlab_bot.py: @test_@atl_bitlab_bot Initialized +[2023-08-23 01:25:05.219718] atl_bitlab_bot.py: @test_@atl_bitlab_bot Polling +[2023-08-23 01:26:13.294585] atl_bitlab_bot.py: @test_atl_bitlab_bot Initialized +[2023-08-23 01:26:13.294585] atl_bitlab_bot.py: @test_atl_bitlab_bot Polling diff --git a/start.sh b/start.sh index 99180cc9..b27c21a7 100755 --- a/start.sh +++ b/start.sh @@ -1,6 +1,6 @@ #!/usr/bin/bash -BASE_DIR="$HOME/telegram-gpt-bot" +BASE_DIR="$HOME/abbot" source "$BASE_DIR/.env/bin/activate" cd "$BASE_DIR/src" -python3 cli.py +python3 cli.py --dev From e0b77656a0255241856416c3ec5ccb8b39cacb01 Mon Sep 17 00:00:00 2001 From: bryan Date: Wed, 23 Aug 2023 01:29:35 +0000 Subject: [PATCH 7/8] abbot server --- abbot.service | 20 ++++++++++---------- atlbitlab-bot.service | 29 ----------------------------- 2 files changed, 10 insertions(+), 39 deletions(-) delete mode 100644 atlbitlab-bot.service diff --git a/abbot.service b/abbot.service index ff2c988b..8d1c17cc 100644 --- a/abbot.service +++ b/abbot.service @@ -1,28 +1,28 @@ [Unit] Description=ATL BitLab Bot -Documentation=https://github.com/ATLBitLab/telegram-gpt-bot +Documentation=https://github.com/ATLBitLab/abbot After=network-online.target Wants=network-online.target [Service] -Environment=HOME=/home/bryan +Environment=HOME=/home/abbot -WorkingDir=/home/bryan/telegram-gpt-bot -ExecStart=/home/bryan/telegram-gpt-bot/start.sh +WorkingDir=/home/abbot/abbot +ExecStart=/home/abbot/abbot/start.sh Restart=always RestartSec=10 -StandardOutput=/home/bryan/telegram-gpt-bot/src/data/runtime.log -StandardError=/home/bryan/telegram-gpt-bot/src/data/debug.log +StandardOutput=/home/abbot/abbot/src/data/runtime.log +StandardError=/home/abbot/abbot/src/data/debug.log -SyslogIdentifier=atlbitlab-bot +SyslogIdentifier=abbot -User=bryan -Group=bryan +User=abbot +Group=abbot -RuntimeDirectory=bitcoind +RuntimeDirectory=abbot RuntimeDirectoryMode=0710 [Install] diff --git a/atlbitlab-bot.service b/atlbitlab-bot.service deleted file mode 100644 index ff2c988b..00000000 --- a/atlbitlab-bot.service +++ /dev/null @@ -1,29 +0,0 @@ -[Unit] -Description=ATL BitLab Bot -Documentation=https://github.com/ATLBitLab/telegram-gpt-bot - -After=network-online.target -Wants=network-online.target - -[Service] -Environment=HOME=/home/bryan - -WorkingDir=/home/bryan/telegram-gpt-bot -ExecStart=/home/bryan/telegram-gpt-bot/start.sh - -Restart=always -RestartSec=10 - -StandardOutput=/home/bryan/telegram-gpt-bot/src/data/runtime.log -StandardError=/home/bryan/telegram-gpt-bot/src/data/debug.log - -SyslogIdentifier=atlbitlab-bot - -User=bryan -Group=bryan - -RuntimeDirectory=bitcoind -RuntimeDirectoryMode=0710 - -[Install] -WantedBy=multi-user.target From aff1da8be1bbd3190a5bd5f3ebbae52fa32b9e34 Mon Sep 17 00:00:00 2001 From: bnonni Date: Tue, 22 Aug 2023 21:29:58 -0400 Subject: [PATCH 8/8] install.sh --- install.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/install.sh b/install.sh index a683e9b4..0d8afae2 100644 --- a/install.sh +++ b/install.sh @@ -1,12 +1,12 @@ #!/usr/bin/env bash source .venv/bin/activate pip install -r requirements.txt -sudo cp atlbitlab-bot.service /etc/systemd/system +sudo cp abbot.service /etc/systemd/system sudo systemctl daemon-reload -sudo systemctl enable atlbitlab-bot -sudo systemctl start atlbitlab-bot -sudo systemctl status atlbitlab-bot -sudo systemctl start atlbitlab-bot -sudo journalctl -u atlbitlab-bot | tail +sudo systemctl enable abbot +sudo systemctl start abbot +sudo systemctl status abbot +sudo systemctl start abbot +sudo journalctl -u abbot | tail echo "Done!" exit 0 \ No newline at end of file