mirror of
https://github.com/kevinthedang/discord-ollama.git
synced 2025-12-12 11:56:06 -05:00
* add redis container * Updated Guides and Goals (#134) * Update README.md * Update commands-guide.md * Update events-guide.md * Update commands-guide.md * Added: redis client * Fixed: redis mock in commands.test.ts * Updated: npm package patches * Fixed: redis ip name in keys.ts * update Node LTS version, workflow env vars * Updated: node package engine requirements * Updated: documentation * fix: upgrade dotenv from 16.4.5 to 16.4.7 (#152) Snyk has created this PR to upgrade dotenv from 16.4.5 to 16.4.7. See this package in npm: dotenv See this project in Snyk: https://app.snyk.io/org/jt2m0l3y/project/d8b070a3-e4a3-457a-977b-7eb6a4a48346?utm_source=github&utm_medium=referral&page=upgrade-pr Co-authored-by: snyk-bot <snyk-bot@snyk.io> * Update: docs patches, connection ordering --------- Co-authored-by: snyk-bot <snyk-bot@snyk.io>
14 lines
411 B
TypeScript
14 lines
411 B
TypeScript
/**
|
|
* Clean up the bot user_id so it only has the prompt
|
|
*
|
|
* Sample: <@CLIENT_ID> Hello
|
|
* - we want to remove <@CLIENT_ID>
|
|
* - replace function works well for this
|
|
*
|
|
* @param message
|
|
* @returns message without client id
|
|
*/
|
|
export function clean(message: string, clientId: string): string {
|
|
const cleanedMessage: string = message.replace(`<@${clientId}>`, '').trim()
|
|
return cleanedMessage
|
|
} |