sayakie / hakase Goto Github PK
View Code? Open in Web Editor NEWDiscord bot to let y'all explore Pixelmon Pokémon information built around Discord Interactions.
License: MIT License
Discord bot to let y'all explore Pixelmon Pokémon information built around Discord Interactions.
License: MIT License
E.g. Perrserker
displays Meowth
instead Galarian Meowth
in evolution spec.
디스코드 Basixlounge 서버에서 받은 코드 리뷰를 토대로 리팩토링 로드맵을 작성했습니다.
아래의 코드를 전부 리팩토링하는 것이 이 로드맵의 최종 목표입니다.
누락된 return
추가하기
[File]: PokemonUtil.ts#L151
PokemonUtil.ts
에서 반복되는 importing 작업을 초기화 페이즈만을 담당하는 다른 파일로 옮기기
[Files]: PokemonUtil.ts#L12-#L58
인스턴스화를 방지하기 위해 클래스에 null을 확장하는 것을 걷어내기
[Benefits]: UB에 준하는 동작을 미리 걷어냄으로써 미래에 야기될 수 있는 문제를 방지합니다.
[Drawbacks]: 타입스크립트를 컴파일한 뒤 런타임에서 클래스를 인스턴스화 할 수 있습니다.
[Files]: ArrayUtil.ts#L5 / Util.ts#L871 / PokemonUtil.ts#L101
[Reference]: tc39/ecma262#1321
조사(은는이가)를 구하는 함수를 문자열 헬퍼 함수를 제공하는 StringUtil.ts
파일에 따로 분리시키기
[File]: PokemonUtil.ts#L73-#L99
타입 단언한 코드들을 타입 추론으로 옮기기
[Benefits]: 타입을 명시하는 의미가 더 명확해집니다.
=== Example)
- const dropItemLengthOrder = {} as { [P in Extract<keyof PokeDrop, `${string}data`>]: number }
+ const dropItemLengthOrder: { [P in Extract<keyof PokeDrop, `${string}data`>]: number } = {}
Each Pokémons have its unique variance forms like mega, alolan, galarian, hisuian, or gigantamax. The Pokedex has a detailed description, but at the same time, Hakase does not have a description.
So I suggest that it would be good to provide more detailed information to users.
Input > /Pokemon Charizard
Output > It spits fire that is hot enough to melt boulders. It may cause forest fires by blowing flames.
Input > /Pokemon Charizard (Mega-X)
Output > The overwhelming power that fills its entire body causes it to turn black and creates intense blue flames.
Input > /Pokemon Charizard (Gigantamax)
Output > This colossal, flame-winged figure of a Charizard was brought about by Gigantamax energy.
No context
When install dependencies, Node throws unsupported Node.js version using v17.
If the given stat does not have a forms
property or which equivalent to an empty object, the method early returns without overwriting bounding_box
to boundingBox
.
Hakase/src/util/loader/statLoader.ts
Lines 23 to 26 in bcb7dcf
Target Pokemons:
Arceus
, Dialga
, Palkia
Heatran
Wyrdeer
to SpeciesGrowlithe
and Braviary
E.g. Diancie
displays Morning, Morning in spawn times field.
ESLint does not interpret Hakase/index.d.ts, might be there is a solution to solve. But we decide deprecate the declaration and merge that into source codebase.
Already provided by discord.js
. Should be removal in next major release.
Hakase/typings/hakase/index.d.ts
Lines 1 to 5 in 3948378
There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.
Error type: Preset is invalid JSON (github>dareharu/renovate-config)
Why..
Lines 93 to 121 in ce84c06
The title says it all.
Reading Species#legendaries
and Species#ultrabests
will always return an empty array that its length is 0.
Lines 905 to 906 in aa66719
This is caused by SpeciesImpl
static initialization step just concats an array, and not set again.
Hakase/src/private/entity/SpeciesImpl.mts
Lines 75 to 176 in aa66719
All variant forms(EnumAegislash
, EnumAlcremie
, etc...) throw a reference error like the following output:
ReferenceError: Cannot access 'FormBelongToSpecies' before initialization
Note: We use Node.js but do not follow the CommonJS module system (instead ECMAScript module system)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.