Skip to content

Commit

Permalink
log/bail nicely on this.... thing where I have no idea what is going on
Browse files Browse the repository at this point in the history
  • Loading branch information
meadowsys committed Aug 21, 2024
1 parent 2c5ab7d commit 316f996
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/Tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,12 @@ const Tools = {
*/
msg_starts_mentioned(msg, text) {
const content = msg.content.toLowerCase().split(">")[1];
if (!content) {
console.error(`warning, content passed in undefined crash bug thing`);
console.error(`"${msg.content}"`);
// just return false for now??
return false;
}
if (content[0] === " ") {
if (content[1] === " ") {
return content.substring(2).startsWith(text);
Expand Down

0 comments on commit 316f996

Please sign in to comment.