(body: string, displayName: string)
| 63 | } |
| 64 | |
| 65 | export function processMessage(body: string, displayName: string) { |
| 66 | let split = body.split('`'); |
| 67 | if (split.length === 3) { |
| 68 | body += ` Also, \`${displayName}\` joined.`; |
| 69 | } else { |
| 70 | let init = split.splice(0, 3).join('`'); |
| 71 | let joined = split.filter( |
| 72 | (t) => t !== ' and ' && t !== ', ' && t !== ' joined.' |
| 73 | ); |
| 74 | const result = `\`${joined.join('`, `')}\` and \`${displayName}\` joined.`; |
| 75 | body = init.concat(result); |
| 76 | } |
| 77 | return body; |
| 78 | } |
| 79 | |
| 80 | async function createThread({ |
| 81 | body, |
no outgoing calls
no test coverage detected