Skip to content

Commit f21c241

Browse files
committed
Delete pin message
1 parent f87dc15 commit f21c241

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

bot.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,8 @@ async def get_context(self, message, *, cls=commands.Context):
223223
return ctx
224224

225225
async def on_message(self, message):
226+
if m.type == discord.MessageType.pins_add and m.author == self.user:
227+
await message.delete()
226228
if message.author.bot:
227229
return
228230
if isinstance(message.channel, discord.DMChannel):

core/thread.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,9 +238,10 @@ async def create(self, recipient, *, creator=None):
238238
channel.send(mention, embed=info_embed)
239239
)
240240

241+
thread.ready = True
242+
241243
await msg.pin()
242244

243-
thread.ready = True
244245
return thread
245246

246247
async def find_or_create(self, recipient):

0 commit comments

Comments
 (0)