mirror of
https://github.com/zkldi/Tachi.git
synced 2026-09-27 09:28:12 +03:00
add warning if no code is specified
This commit is contained in:
@@ -11,6 +11,10 @@ program.option("-c, --code <code>", "The code for this invite.");
|
||||
program.parse(process.argv);
|
||||
const options = program.opts();
|
||||
|
||||
if (!options.code) {
|
||||
throw new Error(`No code specified.`);
|
||||
}
|
||||
|
||||
db.invites
|
||||
.insert({
|
||||
code: options.code,
|
||||
|
||||
Reference in New Issue
Block a user