fix send empty value

pull/9/merge
Michael Yang 2024-02-02 15:02:23 -08:00
parent 2739b2a6e1
commit 200837a051
1 changed files with 6 additions and 3 deletions

View File

@ -31,14 +31,17 @@ class Response:
self.sb.write(s)
value = self.sb.getvalue().strip()
if not value:
return
if self.r:
await self.r.edit(content=self.sb.getvalue() + end)
await self.r.edit(content=value + end)
return
if self.channel.type == discord.ChannelType.text:
self.channel = await self.channel.create_thread(name='Discollama Says', message=self.message, auto_archive_duration=60)
if value := self.sb.getvalue():
self.r = await self.channel.send(value)