From 2fe2302fc8619d248ac5e8f33ce313b60df75e93 Mon Sep 17 00:00:00 2001 From: github-actions <${GITHUB_ACTOR}@users.noreply.github.com> Date: Wed, 28 Dec 2022 05:10:01 +0000 Subject: [PATCH 1/2] Format Python code with psf/black push --- cogs/draw_image_generation.py | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/cogs/draw_image_generation.py b/cogs/draw_image_generation.py index 9f8e2f3..b25170e 100644 --- a/cogs/draw_image_generation.py +++ b/cogs/draw_image_generation.py @@ -81,7 +81,9 @@ class DrawDallEService(commands.Cog, name="DrawDallEService"): embed=embed, file=file, ) - await result_message.edit(view=SaveView(image_urls, self, self.converser_cog, result_message)) + await result_message.edit( + view=SaveView(image_urls, self, self.converser_cog, result_message) + ) self.converser_cog.users_to_interactions[message.author.id] = [] self.converser_cog.users_to_interactions[message.author.id].append( @@ -113,7 +115,11 @@ class DrawDallEService(commands.Cog, name="DrawDallEService"): embed=embed, file=file, ) - await result_message.edit(view=SaveView(image_urls, self, self.converser_cog, result_message)) + await result_message.edit( + view=SaveView( + image_urls, self, self.converser_cog, result_message + ) + ) redo_users[user_id] = RedoUser(prompt, message, result_message) @@ -204,7 +210,9 @@ class DrawDallEService(commands.Cog, name="DrawDallEService"): class SaveView(discord.ui.View): - def __init__(self, image_urls, cog, converser_cog, message, no_retry=False, only_save=None): + def __init__( + self, image_urls, cog, converser_cog, message, no_retry=False, only_save=None + ): super().__init__( timeout=10 if not only_save else None ) # 10 minute timeout for Retry, Save @@ -233,7 +241,12 @@ class SaveView(discord.ui.View): # Create a new view with the same params as this one, but pass only_save=True new_view = SaveView( - self.image_urls, self.cog, self.converser_cog, self.message, self.no_retry, only_save=True + self.image_urls, + self.cog, + self.converser_cog, + self.message, + self.no_retry, + only_save=True, ) # Set the view of the message to the new view From e57403c9151e3583054fa624133b8d9a1d929da9 Mon Sep 17 00:00:00 2001 From: Kaveen Kumarasinghe Date: Wed, 28 Dec 2022 00:13:39 -0500 Subject: [PATCH 2/2] Update main.yml --- .github/workflows/main.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 59a5e24..f856cff 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -32,7 +32,7 @@ jobs: - name: copy file via ssh password uses: appleboy/scp-action@master with: - host: bot.kaveenk.com + host: 104.248.105.234 username: root password: ${{ secrets.SSH_PASS }} port: 22 @@ -41,7 +41,7 @@ jobs: - name: copy file via ssh password uses: appleboy/scp-action@master with: - host: bot.kaveenk.com + host: 104.248.105.234 username: root password: ${{ secrets.SSH_PASS }} port: 22 @@ -50,7 +50,7 @@ jobs: - name: copy file via ssh password uses: appleboy/scp-action@master with: - host: bot.kaveenk.com + host: 104.248.105.234 username: root password: ${{ secrets.SSH_PASS }} port: 22 @@ -61,7 +61,7 @@ jobs: with: local: cogs remote: /home/gptbot/cogs - host: bot.kaveenk.com + host: 104.248.105.234 username: root password: ${{ secrets.SSH_PASS }} - name: Copy via ssh @@ -69,7 +69,7 @@ jobs: with: local: models remote: /home/gptbot/models - host: bot.kaveenk.com + host: 104.248.105.234 username: root password: ${{ secrets.SSH_PASS }} - name: Restart bot! @@ -82,6 +82,6 @@ jobs: screen -dmS GPTBot python3.9 main.py logout exit - host: bot.kaveenk.com + host: 104.248.105.234 user: root pass: ${{ secrets.SSH_PASS}}