File tree Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 1
1
// Package emojimix 合成emoji
2
2
package emojimix
3
3
4
+ var base_url = "https://www.gstatic.com/android/keyboard/emojikitchen/"
5
+
4
6
// var emojis = map[int64]int64{
5
7
// 128516: 20201001, // 😄 grinning face with smiling eyes
6
8
// 128512: 20201001, // 😀 grinning face
Original file line number Diff line number Diff line change 7
7
"net/http"
8
8
"os"
9
9
"path/filepath"
10
+ "strings"
10
11
"testing"
11
12
12
13
emoji "github.com/Andrew-M-C/go.emoji"
@@ -58,7 +59,7 @@ func TestGenerateMap(t *testing.T) {
58
59
if cur != leftEmoji {
59
60
leftEmoji , rightEmoji = rightEmoji , leftEmoji
60
61
}
61
- outer .OuterMap [leftEmoji ].InnerMap [rightEmoji ] = emojiFirst .Get ("gStaticUrl" ).String ()
62
+ outer .OuterMap [leftEmoji ].InnerMap [rightEmoji ] = strings . TrimLeft ( emojiFirst .Get ("gStaticUrl" ).String (), base_url )
62
63
}
63
64
}
64
65
outFile , err := os .Create (filepath .Join (dataPath , "outer_map.bin" ))
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ func init() {
38
38
Help : "- [emoji][emoji]" ,
39
39
}).OnMessage (match ).SetBlock (true ).
40
40
Handle (func (ctx * zero.Ctx ) {
41
- ctx .SendChain (message .Image (ctx .State ["emojimix" ].(string )))
41
+ ctx .SendChain (message .Image (base_url + ctx .State ["emojimix" ].(string )))
42
42
})
43
43
}
44
44
You can’t perform that action at this time.
0 commit comments