Skip to content

Commit

Permalink
fix(utils): handle if ctx.message.text is not defined
Browse files Browse the repository at this point in the history
  • Loading branch information
aldy505 committed Jan 2, 2024
1 parent 6dc43c1 commit d136790
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/command.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const getCommandName = (context) => {
}

const text = context.message.text;
if (text && !text.startsWith("/")) {
if (!text || !text.startsWith("/")) {
return "";
}

Expand Down

0 comments on commit d136790

Please sign in to comment.