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: packages/commandkit/src/app/middlewares/permissions.ts
+2-8Lines changed: 2 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -43,10 +43,7 @@ export async function beforeExecute(ctx: MiddlewareContext) {
43
43
}
44
44
}
45
45
}catch(error){
46
-
Logger.error(
47
-
`Could not send 'Server-only command' DM to user ${interaction?.user.id??message?.author.id} for command ${command.command.name}.`,
48
-
error,
49
-
);
46
+
Logger.error`Could not send 'Server-only command' DM to user ${interaction?.user.id??message?.author.id} for command ${command.command.name}: ${error}`;
50
47
}
51
48
52
49
returnctx.cancel();// Stop the command from executing
@@ -153,10 +150,7 @@ export async function beforeExecute(ctx: MiddlewareContext) {
153
150
});
154
151
}
155
152
}catch(error){
156
-
Logger.error(
157
-
`Could not send 'Not enough permissions' reply to user ${interaction?.user.id??message?.author.id} for command ${command.command.name}.`,
158
-
error,
159
-
);
153
+
Logger.error`Could not send 'Not enough permissions' reply to user ${interaction?.user.id??message?.author.id} for command ${command.command.name}: ${error}`;
160
154
}
161
155
162
156
returnctx.cancel();// Stop the command from executing
0 commit comments