@@ -10,19 +10,9 @@ export function registerUnbookmarkCommand(program: Command, ctx: CliContext): vo
|
||||
.action(async (tweetIdOrUrls: string[]) => {
|
||||
const opts = program.opts();
|
||||
const timeoutMs = ctx.resolveTimeoutFromOptions(opts);
|
||||
const relayBaseUrl = ctx.resolveRelayBaseUrlFromOptions(opts);
|
||||
|
||||
const { cookies, warnings } = await ctx.resolveCredentialsFromOptions(opts);
|
||||
|
||||
for (const warning of warnings) {
|
||||
console.error(`${ctx.p('warn')}${warning}`);
|
||||
}
|
||||
|
||||
if (!cookies.authToken || !cookies.ct0) {
|
||||
console.error(`${ctx.p('err')}Missing required credentials`);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const client = new TwitterClient({ cookies, timeoutMs });
|
||||
const client = new TwitterClient({ relayBaseUrl, timeoutMs });
|
||||
let failures = 0;
|
||||
|
||||
for (const input of tweetIdOrUrls) {
|
||||
|
||||
Reference in New Issue
Block a user