Chess on the ATmosphere checkmate.blue
chess
13
fork

Configure Feed

Select the types of activity you want to include in your feed.

Remove test script.

-49
-49
scripts/delete-temp-records.ts
··· 1 - import { AtpAgent } from '@atproto/api'; 2 - 3 - const IDENTIFIER = process.argv[2]; 4 - const APP_PASSWORD = process.argv[3]; 5 - 6 - if (!IDENTIFIER || !APP_PASSWORD) { 7 - console.error('Usage: npx tsx scripts/delete-temp-records.ts <handle> <app-password>'); 8 - process.exit(1); 9 - } 10 - 11 - const COLLECTIONS = [ 12 - 'blue.checkmate.game', 13 - 'blue.checkmate.challenge', 14 - ]; 15 - 16 - async function main() { 17 - const agent = new AtpAgent({ service: 'https://bsky.social' }); 18 - await agent.login({ identifier: IDENTIFIER, password: APP_PASSWORD }); 19 - console.log(`Logged in as ${agent.session?.did}`); 20 - 21 - for (const collection of COLLECTIONS) { 22 - console.log(`\nListing ${collection}...`); 23 - const res = await agent.com.atproto.repo.listRecords({ 24 - repo: agent.session!.did, 25 - collection, 26 - limit: 100, 27 - }); 28 - 29 - if (res.data.records.length === 0) { 30 - console.log(' No records found.'); 31 - continue; 32 - } 33 - 34 - for (const record of res.data.records) { 35 - const rkey = record.uri.split('/').pop()!; 36 - console.log(` Deleting ${rkey}...`); 37 - await agent.com.atproto.repo.deleteRecord({ 38 - repo: agent.session!.did, 39 - collection, 40 - rkey, 41 - }); 42 - console.log(` Deleted.`); 43 - } 44 - } 45 - 46 - console.log('\nDone. All blue.checkmate.* records deleted.'); 47 - } 48 - 49 - main();