Kaveen Kumarasinghe 2 years ago
commit 7b82d9fbe8

@ -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}}

@ -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

Loading…
Cancel
Save