Files
discord-aidolls/src/utils/mentionClean.ts
Kevin Dang 5061dab335 Remove CLIENT_UID Environment Variable (#123)
* Remove: Client UID References

* Update: version increment
2024-10-06 18:57:39 -07:00

16 lines
442 B
TypeScript

import Keys from "../keys.js"
/**
* 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
}