blob: 92eba2fc5cfd994fa9db624b12dbbd033f774d73 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
import {User} from "./User";
import {GroupMessage} from "./GroupMessage";
import {Group} from "./Group";
import {Client} from "./Client";
import {Sticker} from "./Sticker";
import {StickerSource} from "../enums/StickerSource";
import {StickerMessage} from "./StickerMessage";
/**
* A sticker message sent in a {@link Group}
*/
export class GroupStickerMessage extends GroupMessage implements StickerMessage {
/**
* {@link Sticker} that was sent
*/
public sticker: Sticker;
/**
* @param user - The author of the message
* @param data - Data associated with the sticker
* @param time - The timestamp the message was sent at
* @param groupId - The group the message was sent in
* @param client
* @internal
*/
constructor(user: User, data: any, time: number, groupId: string, client: Client) {
super(user, time, new Group(groupId, client), client, data.expiresInSeconds);
this.sticker = new Sticker(StickerSource.Received, data.sticker, client);
}
}
|