Skip to content

Commit 1d91e49

Browse files
committed
Merge branch 'master' of https://github.com/Tibowl/HuTao
2 parents b995463 + 39db501 commit 1d91e49

6 files changed

Lines changed: 81 additions & 32 deletions

File tree

src/commands/characters/character.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -238,16 +238,16 @@ Note: this command supports fuzzy search.`,
238238
if (data.isFullCharacter(char)) {
239239
const maxAscension = char.ascensions[char.ascensions.length - 1]
240240
embed.addFields({
241-
name: "Base stats",
241+
name: "Base stats",
242242
value: Object.entries(data.getCharStatsAt(char, 1, 0))
243-
.map(([name, value]) => `**${name}**: ${data.stat(name, value)}`)
244-
.join("\n"),
243+
.map(([name, value]) => `**${name}**: ${data.stat(name, value)}`)
244+
.join("\n"),
245245
inline: true
246-
}, {
247-
name: `Lv. ${maxAscension.maxLevel} A${maxAscension.level} stats`,
246+
}, {
247+
name: `Lv. ${maxAscension.maxLevel} A${maxAscension.level} stats`,
248248
value: Object.entries(data.getCharStatsAt(char, maxAscension.maxLevel, maxAscension.level))
249-
.map(([name, value]) => `**${name}**: ${data.stat(name, value)}`)
250-
.join("\n"),
249+
.map(([name, value]) => `**${name}**: ${data.stat(name, value)}`)
250+
.join("\n"),
251251
inline: true
252252
})
253253
}
@@ -449,7 +449,7 @@ ${ Object
449449
}\n\n`) : ""
450450

451451
if (char.media.imgs && relativePage >= 0 && relativePage < char.media.imgs.length) {
452-
const img = char.media.imgs[relativePage]
452+
const img = getLink(char.media.imgs[relativePage])
453453
embed.setDescription(`${videos}[Open image in browser](${img})`)
454454
.setImage(img)
455455
.setThumbnail(null)
@@ -497,9 +497,9 @@ ${ Object
497497
.filter(([lv]) => {
498498
switch (talentMode) {
499499
case "HIGH":
500-
return lv >= 6
500+
return +lv >= 6
501501
case "LOW":
502-
return lv <= 6
502+
return +lv <= 6
503503
case "LITTLE":
504504
default:
505505
return talents.includes(+lv)
@@ -518,7 +518,7 @@ ${ Object
518518
embed.setFooter({ text: `${embed.data.footer?.text} - Use '${config.prefix}c ${char.name} -high' (or -low) to display higher (or lower) levels` })
519519

520520
if (skill.video && talentMode == "LITTLE") {
521-
embed.setImage(skill.video)
521+
embed.setImage(getLink(skill.video))
522522
.setThumbnail("")
523523
}
524524
}

src/commands/misc/guide.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import config from "../../data/config.json"
33
import client from "../../main"
44
import Command from "../../utils/Command"
55
import { CommandSource, Guide, SendMessage } from "../../utils/Types"
6-
import { Colors, findFuzzy, findFuzzyBestCandidates, sendMessage, simplePaginator, urlify } from "../../utils/Utils"
6+
import { Colors, findFuzzy, findFuzzyBestCandidates, getLink, sendMessage, simplePaginator, urlify } from "../../utils/Utils"
77

88

99
export default class GuideCommand extends Command {
@@ -149,7 +149,7 @@ export function getGuidePage(guide: Guide, relativePage: number, currentPage: nu
149149
)
150150

151151
if (page.img)
152-
embed.setImage(page.img)
152+
embed.setImage(getLink(page.img))
153153

154154
return embed
155155
}

src/data/emojis.json

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
"Light Guiding Tetrahedron": "<:Light_Guiding_Tetrahedron:1024808868372553802>",
6969
"Quelled Creeper": "<:Quelled_Creeper:1037678498933907466>",
7070
"Pseudo-Stamens": "<:PseudoStamens:1072158644772294716>",
71+
"Evergloom Ring": "<:Evergloom_Ring:1100383995428085851>",
7172

7273
"Crown of Insight": "<:Crown_of_Insight:827978602674520114>",
7374

@@ -132,7 +133,10 @@
132133
"Puppet Strings": "<:Puppet_Strings:1037678497109377086>",
133134
"Mirror of Mushin": "<:Mirror_of_Mushin:1037678490348167248>",
134135
"Daka's Bell": "<:Dakas_Bell:1037678485747023984>",
135-
136+
"Worldspan Fern": "<:Worldspan_Fern:1100384017599184976>",
137+
"Primordial Greenbloom": "<:Primordial_Greenbloom:1100384012754759742>",
138+
"Everamber": "<:Everamber:1100383991992942704>",
139+
136140
"Calla Lily": "<:Calla_Lily:827978599838908446>",
137141
"Cecilia": "<:Cecilia:827978599457751060>",
138142
"Dandelion Seed": "<:Dandelion_Seed:827978602241851393>",
@@ -167,6 +171,8 @@
167171
"Padisarah": "<:Padisarah:1012447562818654321>",
168172
"Rukkhashava Mushrooms": "<:Rukkhashava_Mushrooms:1012447564718690335>",
169173
"Sand Grease Pupa": "<:Sand_Grease_Pupa:1072161710250659900>",
174+
"Trishiraite": "<:Trishiraite:1100384014411513909>",
175+
"Mourning Flower": "<:Mourning_Flower:1100384010322063411>",
170176
"Scarab": "<:Scarab:1072161711865471027>",
171177

172178
"Tile of Decarabian's Tower": "<:Tile_of_Decarabians_Tower:827978064104259706>",
@@ -355,14 +361,18 @@
355361
"Dendro Samachurl": "<:Dendro_Samachurl:927627061265301524>",
356362
"Cryo Samachurl": "<:Cryo_Samachurl:927627061839945839>",
357363
"Geo Samachurl": "<:Geo_Samachurl:927627062481653861>",
358-
364+
"Anemo Hilichurl Rogue": "<:Anemo_Hilichurl_Rogue:1100383973265383565>",
365+
"Hydro Hilichurl Rogue": "<:Hydro_Hilichurl_Rogue:1100384000327041045>",
366+
359367
"Pyro Abyss Mage": "<:Pyro_Abyss_Mage:927630038189363200>",
360368
"Hydro Abyss Mage": "<:Hydro_Abyss_Mage:927630037044301925>",
361369
"Electro Abyss Mage": "<:Electro_Abyss_Mage:927627057637261383>",
362370
"Cryo Abyss Mage": "<:Cryo_Abyss_Mage:927627057511424030>",
363371
"Abyss Herald: Wicked Torrents": "<:Abyss_Herald_Wicked_Torrents:927627059533086773>",
372+
"Abyss Herald: Frost Fall": "<:Abyss_Herald_Frost_Fall:1100383969998016582>",
364373
"Abyss Lector: Fathomless Flames": "<:Abyss_Lector_Fathomless_Flames:928205699392110673>",
365374
"Abyss Lector: Violet Lightning": "<:Abyss_Lector_Violet_Lightning:927627060929785897>",
375+
"Iniquitous Baptist": "<:Iniquitous_Baptist:1100384003590209616>",
366376
"Rockfond Rifthound Whelp": "<:Rockfond_Rifthound_Whelp:927630041947439184>",
367377
"Thundercraven Rifthound Whelp": "<:Thundercraven_Rifthound_Whelp:927630534081925140>",
368378
"Rockfond Rifthound": "<:Rockfond_Rifthound:927630042178138233>",
@@ -372,6 +382,7 @@
372382
"Shadowy Husk: Line Breaker": "<:Shadowy_Husk_Line_Breaker:943922311457832971>",
373383
"Shadowy Husk: Defender": "<:Shadowy_Husk_Defender:943922311487160350>",
374384
"Black Serpent Knight: Windcutter": "<:Black_Serpent_Knight_Windcutter:958594290064441375>",
385+
"Black Serpent Knight: Rockbreaker Ax": "<:Black_Serpent_Knight_Rockbreaker:1100383979066101791>",
375386

376387
"Fatui Skirmisher - Pyroslinger Bracer": "<:Fatui_Skirmisher_Pyroslinger_Bra:927627060971724810>",
377388
"Fatui Skirmisher - Hydrogunner Legionnaire": "<:Fatui_Skirmisher_Hydrogunner_Leg:927627061500194966>",
@@ -461,6 +472,8 @@
461472
"Winged Dendroshroom": "<:Winged_Dendroshroom:1012449381884121189>",
462473
"Winged Cryoshroom": "<:Winged_Cryoshroom:1012449380135092335>",
463474
"Jadeplume Terrorshroom": "<:Jadeplume_Terrorshroom:1012449330076078181>",
475+
"Consecrated Horned Crocodile": "<:Consecrated_Horned_Crocodile:1100383986972364881>",
476+
"Consecrated Fanged Beast": "<:Consecrated_Fanged_Beast:1100383983700819968>",
464477
"Consecrated Red Vulture": "<:Consecrated_Red_Vulture:1072158310259757128>",
465478
"Consecrated Scorpion": "<:Consecrated_Scorpion:1072158313237717023>",
466479
"Consecrated Flying Serpent": "<:Consecrated_Flying_Serpent:1072158307986460702>",
@@ -473,6 +486,7 @@
473486
"La Signora": "<:La_Signora:927630042178130000>",
474487
"Magatsu Mitake Narukami no Mikoto": "<:Magatsu_Mitake_Narukami_no_Mikot:943475691884773407>",
475488
"Shouki no Kami, the Prodigal": "<:Shouki_no_Kami_the_Prodigal:1037678501161074748>",
489+
"Guardian of Apep's Oasis": "<:Guardian_of_Apeps_Oasis:1100383997701390457>",
476490

477491
"Hydro Mimic Boar": "<:Hydro_Mimic:927641061755584564>",
478492
"Hydro Mimic Crane": "<:Hydro_Mimic:927641061755584564>",
@@ -482,6 +496,7 @@
482496
"Hydro Mimic Ferret": "<:Hydro_Mimic:927641061755584564>",
483497
"Hydro Mimic Frog": "<:Hydro_Mimic:927641061755584564>",
484498
"Hydro Mimic Raptor": "<:Hydro_Mimic:927641061755584564>",
499+
"Hydro Mimic Squirrel": "<:Hydro_Mimic:927641061755584564>",
485500
"Maguu Kenki: Lone Gale": "<:Maguu_Kenki_Galloping_Frost:927641062170833030>",
486501
"Maguu Kenki: Galloping Frost": "<:Maguu_Kenki_Lone_Gale:927641062518968330>",
487502
"Maguu Kenki: Mask of Terror": "<:Maguu_Kenki_Mask_of_Terror:927641062602846208>",
@@ -492,13 +507,15 @@
492507
"Aloy": "<:Aloy:929382836509765693>",
493508
"Amber": "<:Amber:929382997973692476>",
494509
"Arataki Itto": "<:Arataki_Itto:929382997378105385>",
510+
"Baizhu": "<:Baizhu:1100383976272703569>",
495511
"Barbara": "<:Barbara:929382999924027432>",
496512
"Beidou": "<:Beidou:929383000171479040>",
497513
"Bennett": "<:Bennett:929383000326688819>",
498514
"Candace": "<:Candace:1024808855806410823>",
499515
"Chongyun": "<:Chongyun:929382999701745694>",
500516
"Collei": "<:Collei:1012447559421284473>",
501517
"Cyno": "<:Cyno:1024808857760956567>",
518+
"Dehya": "<:Dehya:1100383989199536198>",
502519
"Diluc": "<:Diluc:929383000368619541>",
503520
"Diona": "<:Diona:929382999970185257>",
504521
"Dori": "<:Dori:1018842070036783124>",
@@ -513,12 +530,14 @@
513530
"Kaeya": "<:Kaeya:929383000456712282>",
514531
"Kamisato Ayaka": "<:Kamisato_Ayaka:929382999835963443>",
515532
"Kamisato Ayato": "<:Kamisato_Ayato:958594290429337622>",
533+
"Kaveh": "<:Kaveh:1100384005989347378>",
516534
"Keqing": "<:Keqing:929383000729354250>",
517535
"Klee": "<:Klee:929383000393781310>",
518536
"Kujou Sara": "<:Kujou_Sara:929383000205045800>",
519537
"Kuki Shinobu": "<:Kuki_Shinobu:988745143240757268>",
520538
"Layla": "<:Layla:1051257380752609420>",
521539
"Lisa": "<:Lisa:929383000637063288>",
540+
"Mika": "<:Mika:1100384008459788349>",
522541
"Mona": "<:Mona:929383000708378705>",
523542
"Nahida": "<:Nahida:1037678492483080262>",
524543
"Nilou": "<:Nilou:1037678494773153792>",
@@ -563,6 +582,7 @@
563582
"Carrot": "<:Carrot:938500197833662525>",
564583
"Cheese": "<:Cheese:938500197867212850>",
565584
"Chilled Meat": "<:Chilled_Meat:938500197292580884>",
585+
"Coffee Beans": " <:Coffee_Beans:1100383981544939531>",
566586
"Crab Roe": "<:Crab_Roe:938500198244708352>",
567587
"Crab": "<:Crab:938500198320177173>",
568588
"Cream": "<:Cream:938500197883990108>",

src/data/events.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2521,7 +2521,8 @@
25212521
{
25222522
"name": "\"A Parade of Providence\" Event",
25232523
"type": "In-game",
2524-
"img": "https://i.imgur.com/1DVMRI1.png",
2524+
"link": "https://www.hoyolab.com/article/17950597",
2525+
"img": "https://upload-os-bbs.hoyolab.com/upload/2023/04/24/8b1c9ad438e0fe361fa897a3730f6501_3969280546796885812.jpg",
25252526
"start": "2023-04-27 10:00:00",
25262527
"end": "2023-05-15 03:59:00",
25272528
"reminder": "end"

src/data/guides.json

Lines changed: 36 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -294,21 +294,39 @@
294294
}
295295
},
296296
{
297-
"name": "Scarab route",
298-
"desc": "**Scarab ${Scarab}** can found in the Great Red Sand of Sumeru.\n\n> A tenacious beetle that finds repose within the vast ocean of desert sand. The golden pattern on such beetles' shells hints at some deep relationship between them and the ancient ruins that dot the desert.",
299-
"img": "https://cdn.discordapp.com/attachments/1024787078254444644/1024787114061205584/Scarabsv1.png",
297+
"name": "Sand Grease Pupa route",
298+
"desc": "**Sand Grease Pupa ${Sand Grease Pupa}** can found in the Desert of Hadramaveth.\n\n> You can only find such husks deep in the desert where the Quicksand Eels breed. The hardened shell is meant to protect the Quicksand Eels' larval bodies until they finally acclimate to the conditions of the dry desert.",
299+
"img": "https://cdn.discordapp.com/attachments/1065152189833678898/1068612470622658650/SandGreasePupa.png",
300300
"credits": "Soul",
301301
"links": {
302-
"material": ["Scarab"]
302+
"material": ["Sand Grease Pupa"]
303303
}
304304
},
305305
{
306-
"name": "Sand Grease Pupa route",
307-
"desc": "**Sand Grease Pupa ${Sand Grease Pupa}** can found in the Desert of Hadramaveth.\n\n> You can only find such husks deep in the desert where the Quicksand Eels breed. The hardened shell is meant to protect the Quicksand Eels' larval bodies until they finally acclimate to the conditions of the dry desert.",
308-
"img": "https://cdn.discordapp.com/attachments/1065152189833678898/1068612470622658650/SandGreasePupa.png",
306+
"name": "Mourning Flower route",
307+
"desc": "**Mourning Flower ${Mourning Flower}** can found in Girdle of the Sands.\n\n> Crimson flowers that bloom on ancient battlefields. They can even flourish in the depths of the desert. Their drooping flowers seem to be in mourning for heroes long past.",
308+
"img": "https://cdn.discordapp.com/attachments/1098302663717814465/1098656863471550614/cleanfinished.png",
309+
"credits": "Soul & Grun",
310+
"links": {
311+
"material": ["Mourning Flower"]
312+
}
313+
},
314+
{
315+
"name": "Trishiraite route",
316+
"desc": "**Trishiraite ${Trishiraite}** can found in Girdle of the Sands.\n\n> A splendorous stone that can be found in the depths of desolate mountains, seemingly formed from congealed elemental energy.",
317+
"img": "https://cdn.discordapp.com/attachments/1099439136630390914/1100292193454919771/trishirat2t.png",
318+
"credits": "Soul & Grun",
319+
"links": {
320+
"material": ["Trishiraite"]
321+
}
322+
},
323+
{
324+
"name": "Scarab route",
325+
"desc": "**Scarab ${Scarab}** can found in the Great Red Sand of Sumeru.\n\n> A tenacious beetle that finds repose within the vast ocean of desert sand. The golden pattern on such beetles' shells hints at some deep relationship between them and the ancient ruins that dot the desert.",
326+
"img": "https://cdn.discordapp.com/attachments/1024787078254444644/1024787114061205584/Scarabsv1.png",
309327
"credits": "Soul",
310328
"links": {
311-
"material": ["Sand Grease Pupa"]
329+
"material": ["Scarab"]
312330
}
313331
}
314332
]
@@ -641,6 +659,16 @@
641659
"enemy": ["Shadowy Husk: Standard Bearer", "Shadowy Husk: Line Breaker", "Shadowy Husk: Defender", "Black Serpent Knight: Windcutter"],
642660
"material": ["Gloomy Statuette", "Dark Statuette", "Deathly Statuette"]
643661
}
662+
},
663+
{
664+
"name": "Hilichurl Rogue route (A Flower Yet to Bloom, Treasured Flower and Wanderer's Blooming Flower)",
665+
"desc": "**Hilichurl Rogues ${Anemo Hilichurl Rogue}${Hydro Hilichurl Rogue}** are Elite Enemies found in the Sumeru Desert. They belong to the Hilichurls family and drop **A Flower Yet to Bloom ${A Flower Yet to Bloom}**, **Treasured Flower ${Treasured Flower}** and **Wanderer's Blooming Flower ${Wanderer's Blooming Flower}**.",
666+
"img": "https://cdn.discordapp.com/attachments/959275124312383539/959275172236505159/FakeSerpents.png",
667+
"credits": "Soul",
668+
"links": {
669+
"enemy": ["Anemo Hilichurl Rogue", "Hydro Hilichurl Rogue"],
670+
"material": ["A Flower Yet to Bloom", "Treasured Flower", "Wanderer's Blooming Flower"]
671+
}
644672
}
645673
]
646674
},

src/utils/Utils.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -320,15 +320,15 @@ export function getEventEmbed(event: Event): EmbedBuilder {
320320
inline: true
321321
})
322322
if (event.end) embed.addFields({
323-
name: "End Time",
324-
value: `${event.end}${event.timezone?` (GMT${event.timezone})`:""}\n${endTimes(event)}`,
325-
inline: true
326-
})
323+
name: "End Time",
324+
value: `${event.end}${event.timezone?` (GMT${event.timezone})`:""}\n${endTimes(event)}`,
325+
inline: true
326+
})
327327
if (event.type && event.type !== EventType.Unlock) embed.addFields({
328-
name: "Type",
329-
value: event.type,
330-
inline: true
331-
})
328+
name: "Type",
329+
value: event.type,
330+
inline: true
331+
})
332332

333333
return embed
334334
}

0 commit comments

Comments
 (0)