Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
絵文字ジェネレータボットの作成
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
suzakutakumi
December 04, 2021
Technology
170
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
絵文字ジェネレータボットの作成
絵文字を登録してくれるdiscord bot
suzakutakumi
December 04, 2021
More Decks by suzakutakumi
See All by suzakutakumi
ピクロス作成の中間発表
suzakutakumi
0
110
しゅみろん
suzakutakumi
0
200
trap-search
suzakutakumi
1
68
Pyramid Makerの作成
suzakutakumi
0
72
マークダウンパーサーの自作
suzakutakumi
0
140
send_discord
suzakutakumi
0
74
独自ドメインについて
suzakutakumi
0
67
ESP32とAlexaを用いたエアコン制御
suzakutakumi
0
1.4k
スターリンマージソート
suzakutakumi
3
660
Other Decks in Technology
See All in Technology
素人でもできた!AIを使った短編小説創作入門
delhi09
PRO
0
130
Flutter Widget Previewerで始めるUIプレビューとVRTの自動化
sakusaku3939
0
150
Vue で書く 空間コンピューティング、TresJS と WebXR を使ったXR デバイスのフロントエンド開発
hiranuma
0
120
推論基盤と Scale-Up Interconnect の現状と制約から俯瞰する技術動向
markunet
2
540
Maestro MCPとClaude Code Skillsによる自律的なE2Eテスト支援
asmz
0
300
Adversary Infrastructure Hunting101
disconinja
0
160
ビジネス部門からPOを迎えての半年間の進歩と課題
zozotech
PRO
0
150
ポケモン対戦を自動で記録して振り返ろう
fufufukakaka
0
410
国際カードブランドルール変更に伴うクレジットカード決済取引仕様変更について
k1style
0
250
AI時代のエンジニアの情報発信〜個人の発信を組織の力に変える〜
ryo_kawamata
0
160
Draft AIエージェントの トークン消費を最小化する 8つの原則
kinopeee
6
1.8k
LLMの知識とAIエージェント
happysamurai294
0
110
Featured
See All Featured
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
270
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Agile that works and the tools we love
rasmusluckow
331
22k
Visualization
eitanlees
153
17k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
18k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.2k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
12k
HDC tutorial
michielstock
2
980
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
590
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
4
4.4k
The Limits of Empathy - UXLibs8
cassininazir
2
740
Transcript
絵文字ジェネレータボットの作成 2021/12/04 PiyogrammerConference 2021
自己紹介 HN:朱雀 匠(本名:鈴木 拓眞) Twitter: @suzakutakumi3 Portfolio: http://suzakutakumi.mydns.jp/
None
None
作ったものについて DiscordBotで下のような画像を絵文字に登録できる
絵文字ジェネレータ(Web)について 絵文字をWebで作れます。
最初に思ったこと • いちいち、Webサイトに行くのめんどくさい • ダウンロードのフォルダにダウンロードされる CUIで作ったら楽じゃね
ダウンロード方法1 URLからダウンロード出来そう?
ダウンロード方法2 https://emoji-gen.ninja/emoji_download?align=center&~~~~text=%E8%8D%89 をブラウザの検索欄に入れたら、 できた
bashでのダウンロード curlでダウンロード出来そう? curl URLでは失敗する curl URL -o NAME.png にするとファイルとしてダウンロードできる!
プログラムを書く リクエストパラメータのtextとcolorをコマンドの引数から いじれるように、Bashでいい感じに書く 色をランダムに設定できるようにもしておく
次に思ったこと ・便利は便利だけど、やっぱ登録面倒くさい ・やっぱりすぐ入ると楽だよね BOTで作ったら楽じゃね
DiscordBotでのダウンロード方法 import requests data=requests.get(URL).content このdataが画像のデータそのままになる
絵文字の追加方法 await message.guild.create_custom_emoji(name=名前,image=data) nameは絵文字の名前 imageは先ほど生成した画像データ
プログラムを書く pythonでいい感じに書く 日本語で絵文字の登録ができないので、登録の文字用の引数も用 意する。 こちらも色をランダムに設定できるようにする
できたもの 実践
次にSlackBotを作る
Enterprise Grid organizationじゃないと無理そう
絵文字ジェネレータBOTのダウンロード GitHubのリポジトリは以下のリンクから https://github.com/suzakutakumi/EmojiGenBot 以下のURLからサーバに入れることができます https://discord.com/api/oauth2/authorize?client_id=91 3259724303130634&permissions=1073810496&scop e=bot