rename message type union to better reflect its intention
This commit is contained in:
parent
081f3c6201
commit
fce9091114
@ -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]')
|
||||
|
Loading…
Reference in New Issue
Block a user