forked from cadence/out-of-your-element
Minor documentation rewording
This commit is contained in:
parent
7d4379a099
commit
b060451baf
3 changed files with 8 additions and 8 deletions
|
@ -22,7 +22,7 @@ const ks = sync.require("../../matrix/kstate")
|
|||
const inflightSpaceCreate = new Map()
|
||||
|
||||
/**
|
||||
* @param {import("discord-api-types/v10").RESTGetAPIGuildResult} guild
|
||||
* @param {DiscordTypes.RESTGetAPIGuildResult} guild
|
||||
* @param {any} kstate
|
||||
*/
|
||||
async function createSpace(guild, kstate) {
|
||||
|
@ -199,7 +199,7 @@ async function syncSpaceFully(guildID) {
|
|||
}
|
||||
|
||||
/**
|
||||
* @param {import("discord-api-types/v10").GatewayGuildEmojisUpdateDispatchData | import("discord-api-types/v10").GatewayGuildStickersUpdateDispatchData} data
|
||||
* @param {DiscordTypes.GatewayGuildEmojisUpdateDispatchData | DiscordTypes.GatewayGuildStickersUpdateDispatchData} data
|
||||
* @param {boolean} checkBeforeSync false to always send new state, true to check the current state and only apply if state would change
|
||||
*/
|
||||
async function syncSpaceExpressions(data, checkBeforeSync) {
|
||||
|
@ -209,11 +209,11 @@ async function syncSpaceExpressions(data, checkBeforeSync) {
|
|||
if (!spaceID) return
|
||||
|
||||
/**
|
||||
* @typedef {import("discord-api-types/v10").GatewayGuildEmojisUpdateDispatchData & import("discord-api-types/v10").GatewayGuildStickersUpdateDispatchData} Expressions
|
||||
* @typedef {DiscordTypes.GatewayGuildEmojisUpdateDispatchData & DiscordTypes.GatewayGuildStickersUpdateDispatchData} Expressions
|
||||
* @param {string} spaceID
|
||||
* @param {Expressions extends any ? keyof Expressions : never} key
|
||||
* @param {string} eventKey
|
||||
* @param {(emojis: any[]) => any} fn
|
||||
* @param {typeof expression["emojisToState"] | typeof expression["stickersToState"]} fn
|
||||
*/
|
||||
async function update(spaceID, key, eventKey, fn) {
|
||||
if (!(key in data) || !data[key].length) return
|
||||
|
|
|
@ -437,7 +437,7 @@ async function messageToEvent(message, guild, options = {}, di) {
|
|||
// Then embeds
|
||||
for (const embed of message.embeds || []) {
|
||||
if (embed.type === "image") {
|
||||
continue // Matrix's own image embeds are fine.
|
||||
continue // Matrix's own URL previews are fine for images.
|
||||
}
|
||||
|
||||
// Start building up a replica ("rep") of the embed in Discord-markdown format, which we will convert into both plaintext and formatted body at once
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue