[Twitter]WebhookがTweetを連れてくるわ今日も

ツイートをTwitterからDiscordにウェブフックでポストします。

نووسەر
ゆにてぃー
Daily installs
0
Total installs
29
Ratings
0 0 0
وەشان
1145141919810.0.19
Created
2023-08-05
Updated
2023-09-24
مۆڵەت
MIT
Applies to

このスクリプトと同等の機能があるこちらをインストールするほうがいいかも知れません。

このスクリプトはなにか

このスクリプトはTwitterからDiscordにWebhookでツイートをポストすることができます。 TwitterのURL貼ればいいじゃん?と思うかもしれませんが、本文のURLが展開されてt.coではなくもとのURLで表示されたり、ハッシュタグやメンションがリンクになったりなるべく高画質な画像を埋め込んだりなどの利点があります。

Webhookの設定

ブラウザの拡張機能の欄からTampermonkeyをクリックすると現在のサイトで有効になっているスクリプトの一覧が出るので、このスクリプトの名前を探し、その真下にある「script setting」という項目をクリックすることで設定画面を開くことができます。(画像1)

そして出てきた設定画面(画像2)の「Webhook」という項目の下に「+」ボタンがあるのでそれを押すことでWebhookを追加することができます。

「+」さらにボタンを押すことでもっとたくさんのWebhookを追加できますが、Webhookの名前(WebhookName)はそれぞれ別の名前にする必要があります。

それぞれのWebhookの右側にある「☓」ボタンを押すことでそのWebhookを削除することも可能です。

送信時のオプション(プルダウン)の意味(画像3)

使うwebhook, 送る画像のページ(5はpage all), 引用を送るか, 長いツイートを送るときにtrueにする

=========================================

What is this script?

This script allows you to post tweets from Twitter to Discord using webhooks. You might think, "Why not just paste the Twitter URL?" However, this script offers advantages such as expanding the original URL instead of the shortened t.co, turning hashtags and mentions into clickable links, and embedding the highest quality images possible.

Webhook Settings

By clicking on the Tampermonkey extension from your browser's extension list, you can see a list of scripts active on the current site. Find the name of this script and click on the "script setting" option right below it to open the settings page (See Image 1).

In the settings page that appears (See Image 2), there's a "+" button under the "Webhook" section which allows you to add a webhook.

You can add multiple webhooks by pressing the "+" button again, but each webhook name (WebhookName) must be unique.

You can also delete a webhook by pressing the "☓" button on the right side of each webhook.

Meaning of the Dropdown Options When Sending (See Image 3)

The webhook to use, the page of images to send (5 means all pages), whether to send a quote, and set to true when sending long tweets.