[DAY11]文字与表情符号

改造的前提必然是要先了解程序的运作原理所以我们要先了解LINE提供给我们那些格式去使用
第一个先说到文字讯息,以下是Line提供的格式
TextSendMessage

text_message = TextSendMessage(text='Hello, world')

由於我们到最後都是要使用line_bot_api.reply_message(event.reply_token, message)将讯息传出所以我们先设置一个常数纪录讯息

text
String Required
Message text. You can include the following emoji

我们传出的文字讯息必须是String格式其中可以包含emoji符号

LINE emojis. Use a character as a placeholder and specify the and of the LINE emoji you want to use in the property. For more information, see List of available LINE emojis.
Unicode emojis
(Deprecated) LINE original unicode emojis. See the Unicode code point table for LINE original emoji for details.

接着讲到如何使用emoji
TextSendMessage-Emoji

emoji = [
    {
        "index"(字串位置): 0,
        "productId"(组别ID): "5ac1bfd5040ab15980c9b435",
        "emojiId"(物品於组别中的ID): "001"
    },
    {
        "index": 13,
        "productId": "5ac1bfd5040ab15980c9b435",
        "emojiId": "002"
    }
]
text_message = TextSendMessage(text='$ LINE emoji $', emojis=emoji)

使用emoji需要先选择你要用的emoji找到他的ID,接着选择摆放位置(矩阵),在text中放入$作为纪录。
表情符号清单:List of available LINE emojis | LINE Developers
https://ithelp.ithome.com.tw/upload/images/20210925/20140159uuLRH2wOfN.png


<<:  [13th][Day17] docker registry

>>:  Eloquent ORM - 写入资料

第 27 集:Bootstrap 客制化 reboot 重置

此篇会介绍 Bootstrap 使用的 css reset 档案 _reboot.scss。 事前...

10 - BAT - 使用高亮预览文件

cat 指令可以预览文件的内容,是个简单好用的指令,但是它不会对不同的档案类型提供语法高亮的预览,因...

第一篇笔记-制作具有RPG要素的互动式健身会员系统

这是一篇记录我大专写到一半的笔记文,单纯是觉得写code写出了一点成就感,也是为了能记住曾经走过的歪...

Python - 在 Windows 10 上使用 PySpark 连接 Mysql 资料库参考笔记

Python - 在 Windows 10 上使用 PySpark 连接 Mysql 资料库参考笔记...

JS 属性列举与原型的关系 DAY70

属性列举与原型的关系 自订原型 与 原生原型 最大的不同是在可列举(enumerable)的部分 原...