rename message type union to better reflect its intention

This commit is contained in:
kenobi 2023-11-19 18:24:33 +01:00
parent 081f3c6201
commit fce9091114

View File

@ -6,7 +6,7 @@ export type VoteEndMessage = Message & { readonly __brand: 'voteend' }
export type AnnouncementMessage = Message & { readonly __brand: 'announcement' }
export type VoteMessage = Message & { readonly __brand: 'vote' }
export type DiscordMessage = VoteMessage | VoteEndMessage | AnnouncementMessage
export type KnownDiscordMessage = VoteMessage | VoteEndMessage | AnnouncementMessage
export function isVoteMessage(message: Message): message is VoteMessage {
return message.cleanContent.includes('[Abstimmung]')