formatting

This commit is contained in:
Nicolás Serna 2022-07-18 18:29:08 -03:00
parent 9dbba9d0c4
commit 63faae768a
3 changed files with 6 additions and 7 deletions

View File

@ -1238,9 +1238,9 @@ export type CamelCase<S extends string> = S extends `${infer P1}_${infer P2}${in
export type Camelize<T> = { export type Camelize<T> = {
// deno-lint-ignore ban-types // deno-lint-ignore ban-types
[K in keyof T as CamelCase<string & K>]: T[K] extends Array<infer U> ? U extends {} ? Array<Camelize<U>> [K in keyof T as CamelCase<string & K>]: T[K] extends Array<infer U> ? U extends {} ? Array<Camelize<U>>
: T[K] : T[K]
// deno-lint-ignore ban-types : // deno-lint-ignore ban-types
: T[K] extends {} ? Camelize<T[K]> T[K] extends {} ? Camelize<T[K]>
: never; : never;
}; };

View File

@ -7,7 +7,7 @@ import * as Routes from '../Routes.ts';
/** /**
* A member that comes from a thread * A member that comes from a thread
* @link https://discord.com/developers/docs/resources/channel#thread-member-object * @link https://discord.com/developers/docs/resources/channel#thread-member-object
* **/ * * */
export class ThreadMember implements Model { export class ThreadMember implements Model {
constructor(session: Session, data: DiscordThreadMember) { constructor(session: Session, data: DiscordThreadMember) {
this.session = session; this.session = session;

View File

@ -751,9 +751,8 @@ export class Guild extends BaseGuild implements Model {
splash: 'splashURL' in options splash: 'splashURL' in options
? options.splashURL && urlToBase64(options.splashURL) ? options.splashURL && urlToBase64(options.splashURL)
: options.iconHash && Util.iconBigintToHash(options.iconHash), : options.iconHash && Util.iconBigintToHash(options.iconHash),
banner: 'bannerURL' in options banner: 'bannerURL' in options ? options.bannerURL && urlToBase64(options.bannerURL)
? options.bannerURL && urlToBase64(options.bannerURL) : options.bannerHash && Util.iconBigintToHash(options.bannerHash),
: options.bannerHash && Util.iconBigintToHash(options.bannerHash),
discovery_splash: 'discoverySplashURL' in options discovery_splash: 'discoverySplashURL' in options
? options.discoverySplashURL && urlToBase64(options.discoverySplashURL) ? options.discoverySplashURL && urlToBase64(options.discoverySplashURL)
: options.discoverySplashHash && Util.iconBigintToHash(options.discoverySplashHash), : options.discoverySplashHash && Util.iconBigintToHash(options.discoverySplashHash),