forked from cadence/out-of-your-element
Compare commits
No commits in common. "testing" and "main" have entirely different histories.
4 changed files with 2 additions and 38 deletions
|
|
@ -1,16 +0,0 @@
|
|||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = tab
|
||||
tab_width = 3
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[*.json]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
|
|
@ -1 +0,0 @@
|
|||
*
|
||||
5
.vscode/extensions.json
vendored
5
.vscode/extensions.json
vendored
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"recommendations": [
|
||||
"editorconfig.editorconfig"
|
||||
]
|
||||
}
|
||||
|
|
@ -51,23 +51,9 @@ const preparedInsert = backfill.prepare("INSERT INTO backfill (channel_id, messa
|
|||
|
||||
async function event(event) {
|
||||
if (event.t !== "GUILD_CREATE") return
|
||||
let channel = event.d.channels.find(c => c.id === channelID) || (event.d.threads || []).find(c => c.id === channelID)
|
||||
const guild_id = event.d.id
|
||||
|
||||
if (!channel) {
|
||||
// May be an archived thread not present in GUILD_CREATE data - try fetching via API
|
||||
try {
|
||||
const fetched = await discord.snow.channel.getChannel(channelID)
|
||||
if (!fetched.guild_id || fetched.guild_id !== guild_id) return
|
||||
fetched.guild_id = guild_id
|
||||
discord.channels.set(fetched.id, fetched)
|
||||
channel = fetched
|
||||
} catch (e) {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
const channel = event.d.channels.find(c => c.id === channelID)
|
||||
if (!channel) return
|
||||
const guild_id = event.d.id
|
||||
|
||||
try {
|
||||
await createRoom.syncRoom(channelID)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue