fixes
parent
f3272709be
commit
e39735dd74
|
@ -15,7 +15,7 @@ export default class AddNote extends Command {
|
||||||
public async run(message: Message, args: string[]) {
|
public async run(message: Message, args: string[]) {
|
||||||
try {
|
try {
|
||||||
if (!args[0] || args.length < 1) return this.client.commands.get('help').run(message, [this.name]);
|
if (!args[0] || args.length < 1) return this.client.commands.get('help').run(message, [this.name]);
|
||||||
let { user } = this.client.util.resolveMember(args[0], this.mainGuild);
|
let user = this.client.util.resolveMember(args[0], this.mainGuild)?.user;
|
||||||
if (!user) user = await this.client.getRESTUser(args[0]);
|
if (!user) user = await this.client.getRESTUser(args[0]);
|
||||||
if (!user) return this.error(message.channel, 'The member you specified could not be found.');
|
if (!user) return this.error(message.channel, 'The member you specified could not be found.');
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue