img conversion
This commit is contained in:
1 parent
38c5579fbb
commit
b655adc305
5 files changed
+927
-24
No files matched your search
@@ -17,17 +17,6 @@ const minio = new Minio.Client({
|
||||
const vision = new Vision.ImageAnnotatorClient({ credentials: VISION_CREDENTIALS })
|
||||
const prisma = new PrismaClient()
|
||||
|
||||
// const annotateRequest = {
|
||||
// image: {
|
||||
// source: {
|
||||
// imageUri: 'https://storage.strix.systems/memestream/08169091-5439-4055-b8ac-662bca8a6570.webp'
|
||||
// }
|
||||
// },
|
||||
// features: [{ type: 'TEXT_DETECTION' }],
|
||||
// }
|
||||
|
||||
// console.log(await vision.annotateImage(annotateRequest))
|
||||
|
||||
async function storageBucketExists() {
|
||||
const exists = await minio.bucketExists(STORAGE_BUCKET)
|
||||
if (exists) return true
|
||||
@@ -43,8 +32,9 @@ const CHANNEL_IDS = [
|
||||
'1095060717117374687', // aella memes
|
||||
]
|
||||
|
||||
const scraper = discordScraper(process.env.DISCORD_AUTH)
|
||||
const scraper = discordScraper(process.env.DISCORD_AUTH, vision, minio)
|
||||
|
||||
const msgs = await Promise.all(CHANNEL_IDS.map(c => scraper.getChannelAttachments(c)))
|
||||
|
||||
console.log(msgs)
|
||||
const downloads = await Promise.all(msgs.flat().map(scraper.downloadAttachment))
|
||||
|
||||
Reference in new issue
Block a user