mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Fix tweet
This commit is contained in:
@@ -57,7 +57,6 @@ module.exports = class Pokemon {
|
||||
this.weight = data.missingno ? data.weight : null;
|
||||
this.moveSet = data.missingno ? data.moveSet : [];
|
||||
this.moveSetVersion = data.missingno ? data.moveSetVersion : null;
|
||||
this.trainerCardID = null;
|
||||
this.gameDataCached = data.missingno || false;
|
||||
this.gameDataFetching = data.missingno || false;
|
||||
this.missingno = data.missingno || false;
|
||||
@@ -168,18 +167,6 @@ module.exports = class Pokemon {
|
||||
return this.smogonTiers;
|
||||
}
|
||||
|
||||
async fetchCardID() {
|
||||
if (this.trainerCardID) return this.trainerCardID;
|
||||
const { body } = await request
|
||||
.post('https://pokecharms.com/trainer-card-maker/pokemon-panels')
|
||||
.attach('number', this.id)
|
||||
.attach('_xfResponseType', 'json');
|
||||
const $ = cheerio.load(body.templateHtml);
|
||||
const id = $('li[class="Panel"]').first().attr('data-id');
|
||||
this.trainerCardID = id;
|
||||
return id;
|
||||
}
|
||||
|
||||
async fetchGameData() {
|
||||
if (this.gameDataCached) return this;
|
||||
if (this.gameDataFetching) {
|
||||
|
||||
Reference in New Issue
Block a user