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