You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/events/threadUpdate.js
+30-12Lines changed: 30 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -49,9 +49,14 @@ module.exports = {
49
49
asyncexecute(oldThread,newThread){
50
50
try{
51
51
if(!newThread.manageable){
52
-
logger.error(`No permission to manage thread "${newThread.name}"`,{
53
-
thread: newThread.name,
54
-
});
52
+
logger.error(
53
+
`No permission to manage thread "${newThread.name}" in channel <#${newThread.parentId}>`,
54
+
{
55
+
thread: newThread.name,
56
+
parent: newThread.parent.name,
57
+
parentId: newThread.parentId,
58
+
}
59
+
);
55
60
return;
56
61
}
57
62
@@ -65,11 +70,12 @@ module.exports = {
65
70
// This is debug instead of warn because it's quite common to have no tags, it means the bot was triggered by a thread
66
71
// change in a channel that doesn't have the tags enabled on it.
67
72
logger.debug(
68
-
`Unable to lock thread "${newThread.name}": couldn't find tag name ${process.env.SOLVED_TAG_NAME} in channel #${newThread.parent.name}.`,
73
+
`Unable to lock thread "${newThread.name}": couldn't find tag name ${process.env.SOLVED_TAG_NAME} in channel <#${newThread.parentId}>.`,
69
74
{
70
75
thread: newThread.name,
71
76
solvedTag: process.env.SOLVED_TAG_NAME,
72
-
channe: newThread.parent.name,
77
+
parent: newThread.parent.name,
78
+
parentId: newThread.parentId,
73
79
}
74
80
);
75
81
return;
@@ -85,24 +91,36 @@ module.exports = {
85
91
newThread.createdTimestamp
86
92
).toUTCString();
87
93
logger.info(
88
-
`Not sending closed message to "${newThread.name}" since it was created ${createdDate} which is more than ${process.env.OLD_THREAD_AGE_IN_DAYS} days ago.`,
94
+
`Not sending closed message to "${newThread.name}" in channel <#${newThread.parentId}> since it was created ${createdDate} which is more than ${process.env.OLD_THREAD_AGE_IN_DAYS} days ago.`,
0 commit comments