Skip to content

Commit 3a32a3b

Browse files
author
Valentin Gerbey
committed
Added underline, spoiler and strikethrough message types
1 parent 954213d commit 3a32a3b

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

src/Api/Type/Message/MessageEntityType.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ final class MessageEntityType implements Enum
4545

4646
private const MENTION = 'mention';
4747

48+
private const UNDERLINE = 'underline';
49+
50+
private const SPOILER = 'spoiler';
51+
52+
private const STRIKETHROUGH = 'strikethrough';
53+
4854
private const LIST = [
4955
self::HASH_TAG,
5056
self::CASH_TAG,
@@ -59,6 +65,9 @@ final class MessageEntityType implements Enum
5965
self::TEXT_LINK,
6066
self::TEXT_MENTION,
6167
self::MENTION,
68+
self::UNDERLINE,
69+
self::SPOILER,
70+
self::STRIKETHROUGH,
6271
];
6372

6473
/**
@@ -144,6 +153,21 @@ public static function mention(): self
144153
return new self(self::MENTION);
145154
}
146155

156+
public static function underline(): self
157+
{
158+
return new self(self::UNDERLINE);
159+
}
160+
161+
public static function spoiler(): self
162+
{
163+
return new self(self::SPOILER);
164+
}
165+
166+
public static function strikethrough(): self
167+
{
168+
return new self(self::STRIKETHROUGH);
169+
}
170+
147171
public function equals(MessageEntityType $type): bool
148172
{
149173
return $this->value === $type->value;

0 commit comments

Comments
 (0)