SnowTransfer error handling is no longer pathetic
This commit is contained in:
@@ -28,7 +28,7 @@ async function updatePins(channelID, roomID, convertedTimestamp) {
|
||||
try {
|
||||
var discordPins = await discord.snow.channel.getChannelPinnedMessages(channelID)
|
||||
} catch (e) {
|
||||
if (e.message === `{"message": "Missing Access", "code": 50001}`) {
|
||||
if (e.message === "Missing Access") {
|
||||
return // Discord sends channel pins update events even for channels that the bot can't view/get pins in, just ignore it
|
||||
}
|
||||
throw e
|
||||
|
||||
Reference in New Issue
Block a user