fix: quotes not working (#60)
- add intent - fix regex edited by prettier Co-authored-by: Mylloon <kennel.anri@tutanota.com> Reviewed-on: https://git.kennel.ml/ConfrerieDuKassoulait/Botanique/pulls/60
This commit is contained in:
parent
23c6b6eb48
commit
646f08ae4a
2 changed files with 6 additions and 2 deletions
|
@ -23,7 +23,7 @@ export default async (message: Message, client: Client) => {
|
|||
|
||||
/* Citation */
|
||||
const regex =
|
||||
"https://(?:canary\\.|ptb\\.)?discord(?:app)?\\.com/channels/(\\d{17,19})/(\\d{17,19})/(\\d{17,19})";
|
||||
/https:\/\/(?:canary\.|ptb\.)?discord(?:app)?\.com\/channels\/(\d{17,19})\/(\d{17,19})\/(\d{17,19})/g;
|
||||
const urls = message.content.match(new RegExp(regex, "g"));
|
||||
|
||||
// Ignore message if there is no URLs
|
||||
|
|
|
@ -7,7 +7,11 @@ import { Database } from "sqlite3";
|
|||
/** Creation of the client and definition of its properties. */
|
||||
export default async () => {
|
||||
const client: Client = new Client({
|
||||
intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages],
|
||||
intents: [
|
||||
GatewayIntentBits.Guilds,
|
||||
GatewayIntentBits.GuildMessages,
|
||||
GatewayIntentBits.MessageContent,
|
||||
],
|
||||
});
|
||||
|
||||
client.config = {
|
||||
|
|
Loading…
Reference in a new issue