add detailed error message

This commit is contained in:
alex 2021-05-26 21:45:52 -04:00
parent 5affdb97ad
commit 92e5b288c5
1 changed files with 2 additions and 2 deletions

View File

@ -12,7 +12,7 @@ export async function addInterviewer(message: Discord.Message, args: string[]) {
const name = args.shift(); const name = args.shift();
const link = args.shift(); const link = args.shift();
if (!name || !link) { if (!name || !link) {
await message.channel.send('Missing arguments.'); await message.channel.send("Missing arguments: ```Usage: .interviewer [name] [calendar-link]```");
return; return;
} }
await openDB().then(async (db) => { await openDB().then(async (db) => {
@ -22,7 +22,7 @@ export async function addInterviewer(message: Discord.Message, args: string[]) {
await message.channel.send(`<@${id}>, your info has been added.`); await message.channel.send(`<@${id}>, your info has been added.`);
} else { } else {
await db.run('UPDATE Interviewers SET Name = ?, Link = ? WHERE UserID = ?', name, link, id); await db.run('UPDATE Interviewers SET Name = ?, Link = ? WHERE UserID = ?', name, link, id);
await message.channel.send(`<@${id}, your info has been changed.`); await message.channel.send(`<@${id}>, your info has been changed.`);
} }
}); });
}); });