diff --git a/tags/tags.toml b/tags/tags.toml index ad6cad9..90e133c 100644 --- a/tags/tags.toml +++ b/tags/tags.toml @@ -198,7 +198,7 @@ content = """ const channel = client.channels.cache.get("222086648706498562"); const channel = guild.channels.cache.find(channel => channel.name === "general"); ``` -- Caches in discord.js are [Collections](https://discord.js.org/docs/packages/collection/stable) which extend the native [Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) structure. +- Caches in discord.js are [Collections](https://discord.js.org/docs/packages/collection/stable) which extend the native [Map](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map) structure. - [learn more](https://discordjs.guide/additional-info/collections.html) """ @@ -364,7 +364,7 @@ Explaining `` and `Class#method` notation: [learn more](https://discordjs [collection] keywords = ["collections", "collection-methods"] content = """ -discord.js uses [Collection](https://discord.js.org/docs/packages/collection/stable), an extension of the JS native [Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) structure. +discord.js uses [Collection](https://discord.js.org/docs/packages/collection/stable), an extension of the JS native [Map](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map) structure. - Guide: [learn more](https://discordjs.guide/additional-info/collections.html) [🍪](https://gist.github.com/almostSouji/71a33e5f8e84a0960b4ed3a1609915f5) """ hoisted = true @@ -383,7 +383,7 @@ keywords = ["undici", "node-fetch", "http-requests", "call-rest-apis"] content = """ Making HTTP requests (for example to call rest APIs) - Node: [learn more](https://www.npmjs.com/package/undici) -- MDN: [learn more](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) +- MDN: [learn more](https://developer.mozilla.org/docs/Web/API/Fetch_API) """ [opus] @@ -397,8 +397,8 @@ content = """ [undefined] keywords = ["not-defined", "of-null", "of-undefined", "ofnull", "ofundefined"] content = """ -- `ReferenceError: "x" is not defined`: [learn more](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Not_defined) -- `TypeError: Cannot read properties of undefined/null (reading "x")`: [learn more](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Cant_access_property) +- `ReferenceError: "x" is not defined`: [learn more](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Errors/Not_defined) +- `TypeError: Cannot read properties of undefined/null (reading "x")`: [learn more](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Errors/Cant_access_property) """ hoisted = true @@ -429,7 +429,7 @@ Your bot is trying to send a DM to a user, but failed to do so: - The user has DMs disabled or the bot blocked - The user no longer shares a guild with the bot (make sure to send informational DMs before banning/kicking) - The bot is trying to DM itself or another bot -Note: You cannot check if you can send a DM beforehand but have to handle the [rejection case](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch) +Note: You cannot check if you can send a DM beforehand but have to handle the [rejection case](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/try...catch) """ [path] @@ -518,7 +518,7 @@ keywords = ["massdm", "dmall", "dmal-all"] content = """ Mass DMing users is not allowed as per developer ToS, considered spam and can get you and your bot banned. - Mention `@everyone` to inform all your users at once instead -- Discord Developer Terms of Service: [learn more](https://support-dev.discord.com/hc/en-us/articles/8562894815383) +- Discord Developer Terms of Service: [learn more](https://support-dev.discord.com/hc/articles/8562894815383) """ [codeblock] @@ -593,7 +593,7 @@ keywords = [ ] content = """ Resources to understand Promise: -- MDN: [learn more](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises) +- MDN: [learn more](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Using_promises) - Guide: [learn more](https://discordjs.guide/additional-info/async-await.html) - JavaScript info: [learn more](https://javascript.info/async-await) """ @@ -629,7 +629,7 @@ x = 1; // assigning a value to x '1' == 1 // true '1' === 1 // false ``` -- Equality and sameness in JavaScript: [learn more](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Equality_comparisons_and_sameness) +- Equality and sameness in JavaScript: [learn more](https://developer.mozilla.org/docs/Web/JavaScript/Equality_comparisons_and_sameness) """ [timers] @@ -672,7 +672,7 @@ Checking for things to not be equal in JavaScript: - if (!yourVariable === yourOtherVariable) // !yourVariable is coerced to a boolean value + if (yourVariable !== yourOtherVariable) // checks that one is not equal to the other ``` -- Comparison operators in JavaScript: [learn more](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Expressions_and_Operators#Comparison) +- Comparison operators in JavaScript: [learn more](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Expressions_and_Operators#Comparison) """ [member-user] @@ -870,9 +870,9 @@ keywords = ["cta", "collection-to-array"] content = """ **Converting a Collection to an array** You only need to convert it to an array if you need the index of an entry: -- Iteration (looping) is possible with [`for...of`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of#iterating_over_a_map) over [`Collection#values`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/values) or [`forEach`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/forEach) +- Iteration (looping) is possible with [`for...of`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/for...of#iterating_over_a_map) over [`Collection#values`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map/values) or [`forEach`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map/forEach) - You can transform a Collection to an array with [`Collection#map`](https://discord.js.org/docs/packages/collection/stable/Collection:Class#map) -- If you need indices, you can get the array using [`[...collection.values()]`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/values) +- If you need indices, you can get the array using [`[...collection.values()]`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map/values) """ [member-count] @@ -924,7 +924,7 @@ Like what we do and want to put some money behind it? Donate to discord.js and r - [OpenCollective](https://opencollective.com/discordjs): Use and provide your OC slug *(Settings > Info > URL slug)* - [GitHub Sponsors](https://github.com/sponsors/discordjs): **1)** Create a private [gist](https://gist.github.com/) -**2)** Include your [Discord user ID](https://support.discord.com/hc/en-us/articles/206346498-Where-can-I-find-my-User-Server-Message-ID-) (`348607796335607817`) +**2)** Include your [Discord user ID](https://support.discord.com/hc/articles/206346498-Where-can-I-find-my-User-Server-Message-ID-) (`348607796335607817`) **3)** Include your Transaction id or screenshot of the donation **4)** Send the link to the gist to <@81440962496172032> (`crawl`) via direct message """ @@ -1217,7 +1217,7 @@ The `ephemeral` option when replying to an interaction will be removed in v15 ```diff - {..., ephemeral: true} + {..., flags: MessageFlags.Ephemeral} -``` Read [here]() on how to specify multiple flags +``` Read [here]() on how to specify multiple flags """ [entry-point]