Update SnowTransfer
This commit is contained in:
@@ -60,7 +60,7 @@ module.exports = {
|
||||
|
||||
matrixEventDispatcher.printError(gatewayMessage.t, "Discord", e, gatewayMessage)
|
||||
|
||||
const channelID = gatewayMessage.d["channel_id"]
|
||||
const channelID = gatewayMessage.d?.["channel_id"]
|
||||
if (!channelID) return
|
||||
const roomID = select("channel_room", "room_id", {channel_id: channelID}).pluck().get()
|
||||
if (!roomID) return
|
||||
|
||||
@@ -16,7 +16,7 @@ const ping = sync.require("./interactions/ping.js")
|
||||
// User must have EVERY permission in default_member_permissions to be able to use the command
|
||||
|
||||
function registerInteractions() {
|
||||
discord.snow.interaction.bulkOverwriteApplicationCommands(id, [{
|
||||
discord.snow.interaction.editApplicationCommands(id, [{
|
||||
name: "Matrix info",
|
||||
contexts: [DiscordTypes.InteractionContextType.Guild],
|
||||
type: DiscordTypes.ApplicationCommandType.Message,
|
||||
|
||||
@@ -16,9 +16,9 @@ async function updatePins(pins, prev) {
|
||||
.select("reference_channel_id", "message_id").where({event_id}).and("ORDER BY part ASC").get()
|
||||
if (!row) continue
|
||||
if (added) {
|
||||
discord.snow.channel.addChannelPinnedMessage(row.reference_channel_id, row.message_id, "Message pinned on Matrix")
|
||||
discord.snow.channel.createChannelPinnedMessage(row.reference_channel_id, row.message_id, "Message pinned on Matrix")
|
||||
} else {
|
||||
discord.snow.channel.removeChannelPinnedMessage(row.reference_channel_id, row.message_id, "Message unpinned on Matrix")
|
||||
discord.snow.channel.deleteChannelPinnedMessage(row.reference_channel_id, row.message_id, "Message unpinned on Matrix")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user