update available reactions (#2466)

This commit is contained in:
Evgeny Poberezkin
2023-05-20 14:42:50 +02:00
committed by GitHub
parent acc4cad082
commit 3be2259068
4 changed files with 5 additions and 40 deletions
@@ -1811,11 +1811,6 @@ sealed class MsgReaction {
is Unknown -> ""
}
val cmdString: String get() = when(this) {
is Emoji -> emoji.cmdString
is Unknown -> ""
}
companion object {
val values: List<MsgReaction> get() = MREmojiChar.values().map(::Emoji)
}
@@ -1864,22 +1859,9 @@ enum class MREmojiChar(val value: String) {
@SerialName("👍") ThumbsUp("👍"),
@SerialName("👎") ThumbsDown("👎"),
@SerialName("😀") Smile("😀"),
@SerialName("🎉") Celebration("🎉"),
@SerialName("😕") Confused("😕"),
@SerialName("😕") Sad("😢"),
@SerialName("❤") Heart("❤"),
@SerialName("🚀") Launch("🚀"),
@SerialName("👀") Looking("👀");
val cmdString: String get() = when(this) {
ThumbsUp -> "+"
ThumbsDown -> "-"
Smile -> ")"
Celebration -> "!"
Confused -> "?"
Heart -> "*"
Launch -> "^"
Looking -> "%"
}
@SerialName("🚀") Launch("🚀");
}
@Serializable
+1 -16
View File
@@ -2495,24 +2495,9 @@ public enum MREmojiChar: String, Codable, CaseIterable {
case thumbsup = "👍"
case thumbsdown = "👎"
case smile = "😀"
case celebration = "🎉"
case confused = "😕"
case sad = "😢"
case heart = "❤"
case launch = "🚀"
case looking = "👀"
public var cmdString: String {
switch self {
case .thumbsup: return "+"
case .thumbsdown: return "-"
case .smile: return ")"
case .celebration: return "!"
case .confused: return "?"
case .heart: return "*"
case .launch: return "^"
case .looking: return "%"
}
}
}
extension MsgReaction: Decodable {
+1 -3
View File
@@ -4950,11 +4950,9 @@ chatCommandP =
'+' -> '👍'
'-' -> '👎'
')' -> '😀'
'!' -> '🎉'
'?' -> '😕'
',' -> '😢'
'*' -> head "❤️"
'^' -> '🚀'
'%' -> '👀'
c -> c
refChar c = c > ' ' && c /= '#' && c /= '@'
liveMessageP = " live=" *> onOffP <|> pure False
+1 -1
View File
@@ -267,7 +267,7 @@ instance FromJSON MREmojiChar where
mrEmojiChar :: Char -> Either String MREmojiChar
mrEmojiChar c
| c `elem` ("👍👎😀🎉😕❤️🚀👀" :: String) = Right $ MREmojiChar c
| c `elem` ("👍👎😀😢❤️🚀" :: String) = Right $ MREmojiChar c
| otherwise = Left "bad emoji"
data FileChunk = FileChunk {chunkNo :: Integer, chunkBytes :: ByteString} | FileChunkCancel