Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Golang_chromedp_slack_botでslackの絵文字自動生成ボットをつく...
Search
bmf_san
August 12, 2020
Programming
0
110
Golang_chromedp_slack_botでslackの絵文字自動生成ボットをつくってみた.pdf
bmf_san
August 12, 2020
Tweet
Share
More Decks by bmf_san
See All by bmf_san
レーダーをつくる
bmf_san
0
24
契約テストとPactについて
bmf_san
0
68
5分でわかるSLO
bmf_san
2
96
権限について考える
bmf_san
2
110
自作HTTPルーターから新しいServeMuxへ
bmf_san
3
1.7k
古くなってしまったPHPフレームワークとPHPのバージョンアップ戦略
bmf_san
1
380
アジャイルワークショップ
bmf_san
0
150
Makuakeの認証基盤とRe-Architectureチーム
bmf_san
0
2.7k
天下一HTTPRouter武闘会.pdf
bmf_san
8
4.4k
Other Decks in Programming
See All in Programming
A full stack side project webapp all in Kotlin (KotlinConf 2025)
dankim
0
120
VS Code Update for GitHub Copilot
74th
2
650
なぜ適用するか、移行して理解するClean Architecture 〜構造を超えて設計を継承する〜 / Why Apply, Migrate and Understand Clean Architecture - Inherit Design Beyond Structure
seike460
PRO
3
770
XP, Testing and ninja testing
m_seki
3
250
おやつのお供はお決まりですか?@WWDC25 Recap -Japan-\(region).swift
shingangan
0
140
Agentic Coding: The Future of Software Development with Agents
mitsuhiko
0
100
“いい感じ“な定量評価を求めて - Four Keysとアウトカムの間の探求 -
nealle
1
10k
Team operations that are not burdened by SRE
kazatohiei
1
310
iOS 26にアップデートすると実機でのHot Reloadができない?
umigishiaoi
0
130
ニーリーにおけるプロダクトエンジニア
nealle
0
840
イベントストーミング図からコードへの変換手順 / Procedure for Converting Event Storming Diagrams to Code
nrslib
2
820
MDN Web Docs に日本語翻訳でコントリビュートしたくなる
ohmori_yusuke
1
120
Featured
See All Featured
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.3k
The Pragmatic Product Professional
lauravandoore
35
6.7k
Building an army of robots
kneath
306
45k
Bash Introduction
62gerente
613
210k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Practical Orchestrator
shlominoach
189
11k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
The Straight Up "How To Draw Better" Workshop
denniskardys
234
140k
Designing for Performance
lara
610
69k
How to Ace a Technical Interview
jacobian
278
23k
StorybookのUI Testing Handbookを読んだ
zakiyama
30
5.9k
Build your cross-platform service in a week with App Engine
jlugia
231
18k
Transcript
SlackֆจࣈੜbotΛͭͬͯ͘Έͨ @bmf_san
CPUΛͭͬͨ͘ https://github.com/bmf-san/emoji-generator-slack-app
Slack botʹmention͢Δͱը૾ੜͯ͘͠ΕΔ 4FSWFS ը૾ੜ !CPUCMVFTLZCMVFTMBDLFNPKJ
Slack botͷ࡞Γํ ɾࠓճGoͰͭͬͨ͘ ɾGoͰSlack BotΛ࡞Δʹɺ͜ͷهࣄ͕͔Γ͢ ͍ͷͰৄࡉׂѪ →https://qiita.com/frozenbonito/items/ cf75dadce12ef9a048e9 ɾmentionʹԠ͢Δ͚ͩͷbotൺֱత؆୯ɻdialog ͱ͔interactiveͳ͍ͭ͠ɺͱ͍͏͔໘..
ը૾ੜͷ ɾGoͰը૾ॲཧˠඪ४ͷimageύοέʔδ͕͑Δ ɾimagemagickͷΑ͏ʹॆ࣮ ɾϞβΠΫॲཧɺը૾߹ɺτϦϛϯάɺςΩετඳ ըͱ͔ۃΊΔͱָͦ͠͏ͳύοέʔδ
imageύοέʔδ͏ʁ ɾͬͯΑ͍͕ࠓճΘͳ͔ͬͨ ɾը૾ੜͷͨΊʹඳըͷύϥϝʔλΛνϡʔχϯά ͍ͯ͘͠ͷ͕ۤ࿑ͦ͠͏ɺͬͱָʹΓ͍ͨ ɾtruetypeϑΥϯτ͔͠αϙʔτ͞Ε͍ͯͳ͍
ϔουϨεϒϥβΛ༻͍ͨը૾ੜ ɾϔουϨεϒϥβΛىಈˠSS ɾϑϩϯτΤϯυͰը૾͍͡ΕΔɺCSSΑ͠ɺJS Α͠ ɾϒϥβ͕ରԠ͍ͯ͠ΔfontͳΒΑ͠ ɾࠓճslackֆจࣈͷͨΊͰ͕͢ɺOGPࣗಈੜͱ ͔૬ੑྑͦ͞͏
GoͰϔουϨεϒϥβΛૢΔ ɾChromedp https://github.com/chromedp/chromedp ɾchrome devtools protocolʢchromeΛૢ࡞͢ΔͨΊ ͷϓϩτίϧʣΛαϙʔτ͍ͯ͠Δͭ ɾSeleniumPhantomJSͱ͍ͬͨ֎෦ґଘͳ͠ ɾUI͖Ͱͳ͠ͰchromeΛૢΕΔ
None
chromedpΛͬͯը૾ੜ ɾbotͷϝϯγϣϯʹ͍͍ͭͯΔύϥϝʔλΛը૾ ੜͷͨΊͷೖྗͱͯ͠ѻ͏ ɾ@botname [color] [bgColor] [line1] [line2(optional)] MJOFɺ͕͋Δͱ͖ MJOF͚͕ͩ͋Δͱ͖
chromedpΛͬͯը૾ੜ ɾड͚औͬͨೖྗΛςϯϓϨʔτϑΝΠϧʹల։
None
chromedpΛͬͯը૾ੜ ɾड͚औͬͨೖྗΛςϯϓϨʔτϑΝΠϧʹల։ →canvasΛͬͯඳըʢCSS͚ͩͰΓ͔͕ͨͬͨɺεΫγϣͨͱ͖ ʹ༨ന্͕ࠞͬͯ͟ख͘Ͱ͖ͳ͔ͬͨɻɻcavasͩͱΩϨΠʹͰ͖ ͨʣ ɾ”ը૾ੜͷͨΊʹඳըͷύϥϝʔλΛνϡʔχϯά͍ͯ͘͠ͷ͕ۤ ࿑ͦ͠͏ɺͬͱָʹΓ͍ͨ” →݁ہςΩετඳըͷͨΊͷx࣠ɺy࣠ͷௐΛͬͨ
·ͱΊ ɾGoඪ४ͷimageύοέʔδͰྑ͔ͬͨʂʂʢfontʹ ͩ͜ΘΓͳ͔ͬͨͷͰɾɾʣ