mirror of
https://github.com/osmarks/autobotrobot
synced 2025-07-04 02:53:07 +00:00
Remove horrible bug
This commit is contained in:
parent
a48a2706d5
commit
7f06436252
@ -41,8 +41,6 @@ class Sentience(commands.Cog):
|
|||||||
for prefix in PREFIXES:
|
for prefix in PREFIXES:
|
||||||
if content.startswith(prefix):
|
if content.startswith(prefix):
|
||||||
content = content.removeprefix(prefix).lstrip()
|
content = content.removeprefix(prefix).lstrip()
|
||||||
if content == "wipe_memory":
|
|
||||||
prompt = []
|
|
||||||
if not content and message.embeds:
|
if not content and message.embeds:
|
||||||
content = message.embeds[0].title
|
content = message.embeds[0].title
|
||||||
elif not content and message.attachments:
|
elif not content and message.attachments:
|
||||||
@ -105,7 +103,12 @@ class Sentience(commands.Cog):
|
|||||||
|
|
||||||
# generate response
|
# generate response
|
||||||
generation = await util.generate(self.session, gollark_data + conversation, stop=["\n["])
|
generation = await util.generate(self.session, gollark_data + conversation, stop=["\n["])
|
||||||
generation = generation.strip().strip("[\n ")
|
while True:
|
||||||
|
new_generation = generation.strip().strip("[\n ")
|
||||||
|
new_generation = new_generation.removesuffix("---")
|
||||||
|
if new_generation == generation:
|
||||||
|
break
|
||||||
|
generation = new_generation
|
||||||
if generation:
|
if generation:
|
||||||
await ctx.send(AUTOGOLLARK_MARKER + generation)
|
await ctx.send(AUTOGOLLARK_MARKER + generation)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user