Skip to content

Commit a06b383

Browse files
authored
Change Thread Post logging format. (#36)
* Change thread post logging format to mentions. * Add name/id as well as mentions (Help Threads) * Add name/id as well as mentions (Help Threads)
1 parent b4eef45 commit a06b383

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

modules/help.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,10 @@ async def forum_post_created(self, thread: discord.Thread) -> None:
110110
if not channel:
111111
return
112112

113-
await channel.send(f"{thread.owner} ({thread.owner_id}) created thread '{thread.name}' ({thread.id}).")
113+
msg: str = (
114+
f"{thread.owner} (ID: {thread.owner_id}) created thread: `{thread.name} (ID: {thread.id})` {thread.mention}"
115+
)
116+
await channel.send(msg)
114117

115118
tags = {s.id for s in thread.applied_tags}
116119
# we'll check for individual libs before the generic python tag
@@ -173,7 +176,10 @@ async def solved(self, ctx: core.GuildContext) -> None:
173176
if not channel:
174177
return
175178

176-
msg: str = f"{ctx.author} ({ctx.author.id}) marked thread '{ctx.channel.name}' ({ctx.channel.id}) as solved."
179+
msg: str = (
180+
f"{ctx.author} (ID: {ctx.author.id}) marked thread: `{ctx.channel.name} (ID: {ctx.channel.id})` "
181+
f"{ctx.channel.mention} as solved."
182+
)
177183
await channel.send(msg)
178184

179185
@solved.error

0 commit comments

Comments
 (0)