Vals using lemmy-js-client
Description from the NPM package:
A javascript / typescript client for Lemmy
pdebie
publishYoutubeToLemmy
Script
Publish a Youtube feed to Lemmy This allows you to automatically publish a Youtube channel to to a Lemmy community. Example usage: async function publishMyFeed() {
try {
return @pdebie.publishYoutubeToLemmy({
instance: "lemm.ee",
auth: @me.secrets.lemmee,
communityId: 23316,
youtubeChannelId: "UChZgikssAJkmiQOv_sO-ngQ",
lastSyncTime: @pdebie.spacexLemmyDb.lastSync,
});
}
finally {
@pdebie.spacexLemmyDb.lastSync = new Date().toISOString();
}
} Get a Youtube channel ID here . Make sure to set your lastSync properly, since otherwise you'll keep publishing new posts!
3