forked from cadence/out-of-your-element
Rearrange code (self-review)
This commit is contained in:
parent
c5d6c5e4c7
commit
47ac49a855
16 changed files with 275 additions and 74 deletions
|
@ -78,10 +78,14 @@ function getDiscordParseCallbacks(message, guild, useHTML) {
|
|||
return `@${role.name}:`
|
||||
}
|
||||
},
|
||||
everyone: node =>
|
||||
"@room",
|
||||
here: node =>
|
||||
"@here"
|
||||
everyone: () => {
|
||||
if (message.mention_everyone) return "@room"
|
||||
return "@everyone"
|
||||
},
|
||||
here: () => {
|
||||
if (message.mention_everyone) return "@room"
|
||||
return "@here"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -199,6 +203,7 @@ async function attachmentToEvent(mentions, attachment) {
|
|||
async function messageToEvent(message, guild, options = {}, di) {
|
||||
const events = []
|
||||
|
||||
/* c8 ignore next 7 */
|
||||
if (message.type === DiscordTypes.MessageType.ThreadCreated) {
|
||||
// This is the kind of message that appears when somebody makes a thread which isn't close enough to the message it's based off.
|
||||
// It lacks the lines and the pill, so it looks kind of like a member join message, and it says:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue