|
10 | 10 | (img-input/extract-images |
11 | 11 | "<@123456789>" |
12 | 12 | {:raw-event {:mentions [{:id "123456789" :avatar "avatar123" :username "alice"}]}}) |
13 | | - => {:prompt "@alice" :image-urls ["https://cdn.discordapp.com/avatars/123456789/avatar123.png?size=256"]}) |
| 13 | + => {:prompt "(Image 1 is @alice) @alice" |
| 14 | + :image-urls ["https://cdn.discordapp.com/avatars/123456789/avatar123.png?size=256"]}) |
14 | 15 |
|
15 | 16 | (fact |
16 | 17 | "a hardcoded user mention extracts the custom mario death meme avatar" |
17 | 18 | (img-input/extract-images |
18 | 19 | "<@269292446041636866>" |
19 | 20 | {:raw-event {:mentions [{:id "269292446041636866" :avatar "someavatar" :username "bob"}]}}) |
20 | | - => {:prompt "@bob" :image-urls ["https://i.imgflip.com/4/9omh8s.jpg"]}) |
| 21 | + => {:prompt "(Image 1 is @bob) @bob" |
| 22 | + :image-urls ["https://i.imgflip.com/4/9omh8s.jpg"]}) |
21 | 23 |
|
22 | 24 | (fact |
23 | 25 | "user mentions are extracted and sorted in typing order, not snowflake order" |
24 | 26 | (img-input/extract-images |
25 | 27 | "draw <@333333333> and <@111111111>" |
26 | 28 | {:raw-event {:mentions [{:id "111111111" :avatar "av1" :username "alice"} |
27 | 29 | {:id "333333333" :avatar "av3" :username "charlie"}]}}) |
28 | | - => {:prompt "draw @charlie and @alice" |
| 30 | + => {:prompt "(Image 1 is @charlie. Image 2 is @alice) draw @charlie and @alice" |
29 | 31 | :image-urls ["https://cdn.discordapp.com/avatars/333333333/av3.png?size=256" |
30 | 32 | "https://cdn.discordapp.com/avatars/111111111/av1.png?size=256"]}) |
31 | 33 |
|
|
34 | 36 | (img-input/extract-images |
35 | 37 | "draw me as a wizard" |
36 | 38 | {:raw-event {:author {:id "222222222" :avatar "av2" :username "bob"}}}) |
37 | | - => {:prompt "draw @bob as a wizard" |
| 39 | + => {:prompt "(Image 1 is @bob) draw @bob as a wizard" |
38 | 40 | :image-urls ["https://cdn.discordapp.com/avatars/222222222/av2.png?size=256"]}) |
39 | 41 |
|
40 | 42 | (fact |
41 | 43 | "extracting speaking user's avatar is case-insensitive for 'me'" |
42 | 44 | (img-input/extract-images |
43 | 45 | "draw ME flying" |
44 | 46 | {:raw-event {:author {:id "222222222" :avatar "av2" :username "bob"}}}) |
45 | | - => {:prompt "draw @bob flying" |
| 47 | + => {:prompt "(Image 1 is @bob) draw @bob flying" |
46 | 48 | :image-urls ["https://cdn.discordapp.com/avatars/222222222/av2.png?size=256"]}) |
47 | 49 |
|
48 | 50 | (fact |
|
59 | 61 | "draw me and <@111111111>" |
60 | 62 | {:raw-event {:author {:id "222222222" :avatar "av2" :username "bob"} |
61 | 63 | :mentions [{:id "111111111" :avatar "av1" :username "alice"}]}}) |
62 | | - => {:prompt "draw @bob and @alice" |
| 64 | + => {:prompt "(Image 1 is @bob. Image 2 is @alice) draw @bob and @alice" |
63 | 65 | :image-urls ["https://cdn.discordapp.com/avatars/222222222/av2.png?size=256" |
64 | | - "https://cdn.discordapp.com/avatars/111111111/av1.png?size=256"]})) |
| 66 | + "https://cdn.discordapp.com/avatars/111111111/av1.png?size=256"]}) |
| 67 | + |
| 68 | + (fact |
| 69 | + "a user without an avatar gets the default discord avatar URL" |
| 70 | + (img-input/extract-images |
| 71 | + "<@123456789>" |
| 72 | + {:raw-event {:mentions [{:id "123456789" :username "alice"}]}}) |
| 73 | + => {:prompt "(Image 1 is @alice) @alice" |
| 74 | + :image-urls ["https://cdn.discordapp.com/embed/avatars/5.png"]})) |
0 commit comments