From 7f98fa446dcd3d9c57683db9451e8f7d2f461d25 Mon Sep 17 00:00:00 2001 From: github-actions <${GITHUB_ACTOR}@users.noreply.github.com> Date: Thu, 29 Dec 2022 05:52:53 +0000 Subject: [PATCH 1/2] Format Python code with psf/black push --- cogs/image_prompt_optimizer.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cogs/image_prompt_optimizer.py b/cogs/image_prompt_optimizer.py index eb7851a..74ebc02 100644 --- a/cogs/image_prompt_optimizer.py +++ b/cogs/image_prompt_optimizer.py @@ -89,9 +89,11 @@ class ImgPromptOptimizer(commands.Cog, name="ImgPromptOptimizer"): await ctx.reply("I'm sorry, I can't mention users, roles, or channels.") return - response_message = await ctx.reply(response_text.replace("Optimized Prompt:",""). - replace("Output Prompt:", ""). - replace("Output:","")) + response_message = await ctx.reply( + response_text.replace("Optimized Prompt:", "") + .replace("Output Prompt:", "") + .replace("Output:", "") + ) self.converser_cog.users_to_interactions[ctx.message.author.id] = [] self.converser_cog.users_to_interactions[ctx.message.author.id].append( From 568524d208fdb505ce01c2e61726cf03a5345f9a Mon Sep 17 00:00:00 2001 From: Taylor Bell Date: Wed, 28 Dec 2022 23:23:32 -0700 Subject: [PATCH 2/2] Add additional running commands to README * Added a note about where to find Guild and Channel IDs for the `.env` file. * Added commands to run the bot using [screen](https://www.gnu.org/software/screen/manual/screen.html) so the bot continues to run after disconnecting the SSH session --- README.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index ae14039..32ea763 100644 --- a/README.md +++ b/README.md @@ -101,16 +101,18 @@ After login, we need to install the various dependencies that the bot needs. To # Install project dependencies 15 python3.9 -m pip install -r requirements.txt 16 ls -# Copy the sample.env file into a regular .env file. You will need to edit this file. - 17 scp sample.env .env +# Copy the sample.env file into a regular .env file. `DEBUG_GUILD` can be found by right-clicking your server and choosing "Copy ID". Similarly, `DEBUG_CHANNEL` can be found by right-clicking your debug channel. + 17 cp sample.env .env # The command below is used to edit the .env file and to put in your API keys. You can right click within the # editor after running this command to paste. When you are done editing, press CTRL + X, and then type Y, to save. 18 nano .env 19 ls -# Run the bot. - 20 python3.9 main.py - 21 ls +# Run the bot using [screen](https://www.gnu.org/software/screen/manual/screen.html) to keep it running after you disconnect from your SSH session: + 20 screen python3.9 main.py +# Hit `Ctrl+a` then `d` to detach from the running bot. +# The bot's screen session can be reattached: + 21 screen -r ```