(
server: Server,
channel: Channel | ChannelWithFlags,
author: DiscordAccount,
override: Omit<
Partial<BaseMessageWithRelations>,
'authorId' | 'channelId' | 'serverId'
> = {},
)
| 41 | } |
| 42 | |
| 43 | export function mockMessage( |
| 44 | server: Server, |
| 45 | channel: Channel | ChannelWithFlags, |
| 46 | author: DiscordAccount, |
| 47 | override: Omit< |
| 48 | Partial<BaseMessageWithRelations>, |
| 49 | 'authorId' | 'channelId' | 'serverId' |
| 50 | > = {}, |
| 51 | ) { |
| 52 | return getDefaultMessage({ |
| 53 | id: getRandomId(), |
| 54 | authorId: author.id, |
| 55 | channelId: channel.id, |
| 56 | serverId: server.id, |
| 57 | content: getRandomSentence(), |
| 58 | ...override, |
| 59 | }); |
| 60 | } |
| 61 | |
| 62 | export function mockServer(override: Partial<Server> = {}) { |
| 63 | return getDefaultServer({ |
no test coverage detected