feat: add mfa code completion from TOTP key
This commit is contained in:
24
typings/index.d.ts
vendored
24
typings/index.d.ts
vendored
@@ -3428,6 +3428,29 @@ export class ThreadMemberFlags extends BitField<ThreadMemberFlagsString> {
|
||||
public static resolve(bit?: BitFieldResolvable<ThreadMemberFlagsString, number>): number;
|
||||
}
|
||||
|
||||
export class TOTP {
|
||||
private static hex2dec(hex: string): number;
|
||||
private static dec2hex(dec: number): string;
|
||||
private static base32ToBuffer(str: string): ArrayBuffer;
|
||||
private static asciiToBuffer(str: string): ArrayBuffer;
|
||||
private static hex2buf(hex: string): ArrayBuffer;
|
||||
private static buf2hex(buf: ArrayBuffer): string;
|
||||
private static readonly base32: { [key: number]: number };
|
||||
private static readonly crypto: SubtleCrypto;
|
||||
static generate(key: string, options?: generateOptions): Promise<{ otp: string; expires: number}>;
|
||||
}
|
||||
|
||||
export type TOTPAlgorithm = "SHA-1" | "SHA-256" | "SHA-384" | "SHA-512";
|
||||
export type TOTPEncoding = "hex" | "ascii";
|
||||
|
||||
export interface generateOptions {
|
||||
digits: number;
|
||||
algorithm: TOTPAlgorithm;
|
||||
encoding: TOTPEncoding;
|
||||
period: number;
|
||||
timestamp: number;
|
||||
}
|
||||
|
||||
export class Typing extends Base {
|
||||
private constructor(channel: TextBasedChannel, user: PartialUser, data?: RawTypingData);
|
||||
public channel: TextBasedChannel;
|
||||
@@ -5711,6 +5734,7 @@ export interface ClientOptions {
|
||||
ws?: WebSocketOptions;
|
||||
http?: HTTPOptions;
|
||||
rejectOnRateLimit?: string[] | ((data: RateLimitData) => boolean | Promise<boolean>);
|
||||
TOTPKey?: string;
|
||||
}
|
||||
|
||||
export type ClientPresenceStatus = 'online' | 'idle' | 'dnd';
|
||||
|
||||
Reference in New Issue
Block a user