1日ごとにScrapboxの更新を通知するbot
/takker/1日ごとにScrapboxの更新を通知するbot
使いたいwogikaze.iconkuroma6666.icon
メッチャ井戸端依存症なっててマズイ
あーそっか。コードを公開してなかったんだっけtakker.icon
公開できるかな?
公開されてた
scrapbox-multistreamのgasブランチにコードがあった
build用script
これを実行して出てきたコードをGASに貼り付ける
そのあとsubscribe(settings)を定期的に実行するようタイマーを仕掛ける
settingsは各自で設定する
connect.sidも各自で設定する
denoなんもわからないのできついっす...wogikaze.icon
code:error.sh
$ deno run https://raw.githubusercontent.com/takker99/scrapbox-multistream/gas/gas/build.ts
error: Uncaught (in promise) TypeError: Deno.emit is not a function
const bundled = await Deno.emit(new URL("./main.ts", import.meta.url), {
何一つあっている自信がないwogikaze.icon
Deno.emit廃止されてたんだったtakker.icon
2022-03あたりに動かしたっきり何もいじっていなかったので、コードが最新のAPIに適用できていなかった
emitが入ってないのが原因と読みimport { emit } from "https://deno.land/x/emit/mod.ts";
code:error.sh
error: Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'deno:///bundle.js')
const bundledCode = bundled.files"deno:///bundle.js";
!!!わからん!!!
お手上げ
/programming-notes/1日ごとにScrapboxの更新を通知するbot
とりあえず.gsコードになってるこっちを使わせてもらおうwogikaze.icon
Discordのwebhookに流すように改造しましょ
/link/slackにしたらいいだけ?
ひとまず、GASで動かしているコードを/takker-dist/scrapbox2slackに貼り付けておきましたtakker.icon
main()を定期的に実行する
createDefaultSettings()は各自で書く必要あり
ありがとうございます!wogikaze.icon