mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-15 05:41:51 +00:00
fix channel.messages
Signed-off-by: GitHub <noreply@github.com>
This commit is contained in:
parent
ddec78b929
commit
3903db7d10
1 changed files with 2 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
|||
import { PermissionsBitField, Snowflake } from "discord.js";
|
||||
import { ChannelType, PermissionsBitField, Snowflake } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import moment from "moment-timezone";
|
||||
import { LogType } from "../../../data/LogType";
|
||||
|
@ -17,7 +17,7 @@ export async function deleteNextItem(pluginData: GuildPluginData<AutoDeletePlugi
|
|||
scheduleNextDeletion(pluginData);
|
||||
|
||||
const channel = pluginData.guild.channels.cache.get(itemToDelete.message.channel_id as Snowflake);
|
||||
if (!channel) {
|
||||
if (!channel || channel.type === ChannelType.GuildCategory) {
|
||||
// Channel was deleted, ignore
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue