add !members, fix typescript

This commit is contained in:
Ryan Cao 2022-05-22 12:49:25 +08:00
parent 1c94cf15b5
commit 1908a4f79e
No known key found for this signature in database
GPG key ID: 528A2C1B6656B97F
3 changed files with 22 additions and 4 deletions

View file

@ -40,7 +40,7 @@ client.once('ready', async () => {
BuildConfig.DEBUG_CHANNEL_ID
);
if (!DEBUG_CHANNEL.isText()) throw new Error();
if (!DEBUG_CHANNEL || !DEBUG_CHANNEL.isText()) throw new Error();
DEBUG_CHANNEL.send({
embeds: [
{
@ -84,10 +84,10 @@ client.once('ready', async () => {
// }
{
const urlMatches = e.content.matchAll(urlRegex());
const urlMatches = [...e.content.matchAll(urlRegex())];
if (urlMatches) {
console.log('Found links in message!');
console.log('Found links in message from', e.author.tag);
for (const match of urlMatches) {
console.log('[link]', match[0]);