83 lines
1.5 KiB
TypeScript
83 lines
1.5 KiB
TypeScript
|
/*
|
||
|
This is a interface for store all the cahce.
|
||
|
Cache will store all the information of the user:
|
||
|
- Channels
|
||
|
- Friends
|
||
|
export interface Cache {
|
||
|
channels: Channel;
|
||
|
friends: Friends;
|
||
|
}
|
||
|
|
||
|
// Honestly I don't know if keep these private but whatever.
|
||
|
|
||
|
export interface User {
|
||
|
id_channel: string;
|
||
|
id_user: string;
|
||
|
name: string;
|
||
|
discriminator?: number; // Just in case
|
||
|
}
|
||
|
|
||
|
*/
|
||
|
|
||
|
// Generated by https://quicktype.io
|
||
|
|
||
|
export interface Messages {
|
||
|
id: string;
|
||
|
type: number;
|
||
|
content: string;
|
||
|
channel_id: string;
|
||
|
author: Author;
|
||
|
attachments: Attachment[];
|
||
|
embeds: any[];
|
||
|
mentions: any[];
|
||
|
mention_roles: any[];
|
||
|
pinned: boolean;
|
||
|
mention_everyone: boolean;
|
||
|
tts: boolean;
|
||
|
timestamp: string;
|
||
|
edited_timestamp: null | string;
|
||
|
flags: number;
|
||
|
}
|
||
|
|
||
|
export interface Attachment {
|
||
|
id: string;
|
||
|
filename: string;
|
||
|
size: number;
|
||
|
url: string;
|
||
|
proxy_url: string;
|
||
|
width: number;
|
||
|
height: number;
|
||
|
}
|
||
|
|
||
|
export interface Author {
|
||
|
id: string;
|
||
|
username: string;
|
||
|
avatar: null | string;
|
||
|
discriminator: string;
|
||
|
public_flags: number;
|
||
|
}
|
||
|
|
||
|
export interface Channels {
|
||
|
id: string;
|
||
|
name: string;
|
||
|
icon: null | string;
|
||
|
owner: boolean;
|
||
|
permissions: string;
|
||
|
features: string[];
|
||
|
}
|
||
|
|
||
|
export interface User {
|
||
|
id: string;
|
||
|
type: number;
|
||
|
last_message_id: string;
|
||
|
recipients: Recipient[];
|
||
|
}
|
||
|
|
||
|
export interface Recipient {
|
||
|
id: string;
|
||
|
username: string;
|
||
|
avatar: string;
|
||
|
discriminator: string;
|
||
|
public_flags: number;
|
||
|
}
|