Skip to content

Commit

Permalink
fix: proper data types
Browse files Browse the repository at this point in the history
  • Loading branch information
sinkaroid committed Oct 8, 2022
1 parent 8922393 commit a66c70e
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 42 deletions.
40 changes: 20 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@ This resources mostly hand-picked but also automate pick and does not low qualit

## Features
<img align="right" src="https://cdn.discordapp.com/attachments/952117487166705747/962562849874542642/tong.png" width="440"></img>
- Fate Grand Order sex
- Genshin Impact sex
- Azur Lane sex
- Fate grand order sex
- Genshin impact sex
- Azur lane sex
- Hololive sex
- Arknights sex
- Fire Emblem sex
- Girls' Frontline sex
- Fire emblem sex
- Girls' frontline sex
- Kancolle sex
- Random gif sex
- Get wholesome waifu
- Fgo reaction
- Anime sex like `nekos.life` do, but more juicier
- Anime sex like `nekos.life` do, but juicier

---

Expand Down Expand Up @@ -96,54 +96,54 @@ sca.getAnimeSex('hentai').then((res) => { console.log('anime sex', res) });
```js
fgo {
data: {
character: 'nero claudius',
character: 'medusa (rider)',
approver: '@sinkaroid',
favorites: 0,
rating: 'questionable',
category: 'fgo'
},
info: '0.83',
image: 'https://tomoe.scathach.software/original/3e/36/3e36f644a051bee376f1dda8c3717880.jpg',
info: '0.48',
image: 'https://tomoe.sinkaroid.org/original/d3/96/d396bfb5afed67e708a0664473963b0c.jpg',
size: 'original',
type: 'jpg',
nsfw: true,
fetch: 'rUFcyOimM2'
fetch: '6PXq4YVgBS'
}
```
- **Genshin**
```js
genshin {
data: {
character: 'kujou sara',
character: 'beidou',
approver: '@sinkaroid',
favorites: 0,
rating: 'explicit',
rating: 'questionable',
category: 'genshin_impact'
},
info: '0.85',
image: 'https://tomoe.scathach.software/original/59/91/599160ee0840872d78250edcf4fd2d5c.png',
info: '0.39',
image: 'https://tomoe.sinkaroid.org/original/87/e8/87e8e55ab9a7c02779c7086ec8f36641.png',
size: 'original',
type: 'png',
nsfw: true,
fetch: 'g5ljvRpnGL'
fetch: 'qyVAlZMS9b'
}
```
- **Azur lane**
```js
azur {
data: {
character: 'formidable',
character: 'taihou',
approver: '@sinkaroid',
favorites: 0,
rating: 'questionable',
rating: 'explicit',
category: 'azur_lane'
},
info: '0.70',
image: 'https://tomoe.scathach.software/original/c6/40/c6404521f422560458c767dde9410731.jpg',
info: '0.41',
image: 'https://tomoe.sinkaroid.org/original/5c/40/5c408922b9195f37e0744adda01bdbac.jpg',
size: 'original',
type: 'jpg',
nsfw: true,
fetch: 'eJ4TYhpE7ARmvwQxMldj'
fetch: 'DkOC0M3GrNQUZpAcHWqP'
}
```

Expand Down
34 changes: 19 additions & 15 deletions index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import defaults from './src/defaults';
import { config } from './src/types';
import { IReaction } from './src/types';
import { ISexAnime } from './src/types';
import { IWaifu } from './src/types';
import { IImgboard } from './src/types';
import request from './src/request';


Expand Down Expand Up @@ -29,7 +33,7 @@ class Scathach {
apikey: this.apikey
}).catch((err) => console.error(err));

return res;
return res as ISexAnime;

}

Expand All @@ -45,7 +49,7 @@ class Scathach {
apikey: this.apikey
}).catch((err) => console.error(err));

return res;
return res as ISexAnime;

}

Expand All @@ -61,7 +65,7 @@ class Scathach {
apikey: this.apikey
}).catch((err) => console.error(err));

return res;
return res as ISexAnime;

}

Expand All @@ -77,7 +81,7 @@ class Scathach {
apikey: this.apikey
}).catch((err) => console.error(err));

return res;
return res as IWaifu;

}

Expand All @@ -92,7 +96,7 @@ class Scathach {
apikey: this.apikey
}).catch((err) => console.error(err));

return res;
return res as ISexAnime;

}

Expand All @@ -108,7 +112,7 @@ class Scathach {
apikey: this.apikey
}).catch((err) => console.error(err));

return res;
return res as ISexAnime;

}

Expand All @@ -124,7 +128,7 @@ class Scathach {
apikey: this.apikey
}).catch((err) => console.error(err));

return res;
return res as ISexAnime;

}

Expand All @@ -140,7 +144,7 @@ class Scathach {
apikey: this.apikey
}).catch((err) => console.error(err));

return res;
return res as ISexAnime;

}

Expand All @@ -156,7 +160,7 @@ class Scathach {
apikey: this.apikey
}).catch((err) => console.error(err));

return res;
return res as ISexAnime;

}

Expand All @@ -172,7 +176,7 @@ class Scathach {
apikey: this.apikey
}).catch((err) => console.error(err));

return res;
return res as ISexAnime;

}

Expand Down Expand Up @@ -203,7 +207,7 @@ class Scathach {
useragent: this.useragent
}).catch((err) => console.error(err));

return res;
return res as IReaction;

}

Expand Down Expand Up @@ -250,7 +254,7 @@ class Scathach {
useragent: this.useragent
}).catch((err) => console.error(err));

return res;
return res as IReaction;

}

Expand All @@ -272,7 +276,7 @@ class Scathach {
useragent: this.useragent
}).catch((err) => console.error(err));

return res;
return res as IImgboard;

}

Expand All @@ -295,7 +299,7 @@ class Scathach {
useragent: this.useragent
}).catch((err) => console.error(err));

return res;
return res as IImgboard;

}

Expand All @@ -318,7 +322,7 @@ class Scathach {
useragent: this.useragent
}).catch((err) => console.error(err));

return res;
return res as IImgboard;

}

Expand Down
42 changes: 35 additions & 7 deletions src/types.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,39 @@
export type config = {
/**
* Custom Useragent which gets sent
* @default scathach-api/v{currentVersion}
*/
useragent?: string;
/**
* Your API Keys from the scathach bot
*/
apikey?: string | undefined;
};

export interface IReaction {
url: string;
}

export interface IWaifu {
image?: string;
anime?: string;
name?: string;
}

export interface IImgboard {
info?: string;
message?: string;
pattern_block?: string
clean_image?: string[];
is_shuffle: boolean;
from_booru?: string;
}

export interface ISexAnime {
data: {
character: string;
approver: string;
favorites: number;
rating: string;
category: string;
}
info: string;
image?: string;
size?: string;
type?: string;
nsfw: boolean;
fetch: string;
}

0 comments on commit a66c70e

Please sign in to comment.