mirror of
https://github.com/tribufu/sdk-js
synced 2025-06-17 11:04:19 +00:00
Parse bot token to get id and add examples
This commit is contained in:
19
src/token.ts
Normal file
19
src/token.ts
Normal file
@ -0,0 +1,19 @@
|
||||
// Copyright (c) Tribufu. All Rights Reserved.
|
||||
|
||||
export type TokenType = "user" | "bot" | "client" | "server";
|
||||
|
||||
export interface TokenPayload {
|
||||
jti: string;
|
||||
type: TokenType;
|
||||
iss: string;
|
||||
aud: string;
|
||||
client_id: string;
|
||||
scope: string;
|
||||
user_id?: string;
|
||||
bot_id?: string;
|
||||
private_flags?: string;
|
||||
public_flags?: string;
|
||||
server_id?: string;
|
||||
iat: number;
|
||||
exp: number;
|
||||
}
|
Reference in New Issue
Block a user