-
Notifications
You must be signed in to change notification settings - Fork 5
feat(on_message): audit messages #56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you merge with main - I added some linting, updated deps, updated pocketbase (you might want to run go run main.go migrate history-sync
in the pocketbase
folder before running pnpm db:dev
)
src/events/on_message/_advise.ts
Outdated
return newContent; | ||
})(); | ||
|
||
await message.author.send( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should catch this as if a user has their dms disabled this'll fail
src/events/on_message/_advise.ts
Outdated
if (!caughtLinks) return; | ||
const hasXLinks: boolean = caughtLinks.some((item) => | ||
item.startsWith('https://x.com'), | ||
); | ||
if (!hasXLinks) return; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small nit, can you add some spacing between blocks of logic so it's more readable
- Provide advise for certain message content - When messages contain links to X, advise to use xcancel for better previews
- Attempt a DM first, if that fails then do an inline reply with the converted x.com link
Closes #55
x.com
, send DM to user suggesting to usexcancel.com
instead along with a copy-paste snippet to help.