Skip to content
This repository has been archived by the owner on Sep 30, 2020. It is now read-only.

Commit

Permalink
add another checker for args[0]
Browse files Browse the repository at this point in the history
  • Loading branch information
sr229 committed Dec 28, 2017
1 parent a7a3e5a commit 824a180
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/cmd/misc/ship/ship.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ exports.ship = {
if (ctx.mentions[0] && new RegExp(`<@!?${ctx.mentions[0].id}>`).test(ctx.args[1])) {
ctx.mentions[1] = ctx.mentions[0];
ctx.mentions[0] = null;
} else if (ctx.mentions[0] && new RegExp(`<@!?${ctx.mentions[0].id}>`).test(ctx.args[0])) {
ctx.mentions[0] = ctx.mentions[0];
ctx.mentions[1] = null;
}

let a = !ctx.mentions[0] ? ctx.args[0] : ctx.mentions[0].username;
Expand Down

0 comments on commit 824a180

Please sign in to comment.