mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-11 20:55:01 +00:00
more typings
Signed-off-by: GitHub <noreply@github.com>
This commit is contained in:
parent
010451c7e7
commit
b9f2aee8b7
14 changed files with 44 additions and 30 deletions
|
@ -1,4 +1,4 @@
|
|||
import { Snowflake, TextChannel, ThreadChannel } from "discord.js";
|
||||
import { GuildTextBasedChannel, Snowflake, TextChannel, ThreadChannel } from "discord.js";
|
||||
import { GuildPluginData } from "knub";
|
||||
import { availableActions } from "../actions/availableActions";
|
||||
import { CleanAction } from "../actions/clean";
|
||||
|
@ -18,7 +18,7 @@ export async function runAutomod(pluginData: GuildPluginData<AutomodPluginType>,
|
|||
const channelOrThread =
|
||||
context.channel ??
|
||||
(channelIdOrThreadId
|
||||
? (pluginData.guild.channels.cache.get(channelIdOrThreadId as Snowflake) as TextChannel | ThreadChannel)
|
||||
? (pluginData.guild.channels.cache.get(channelIdOrThreadId as Snowflake) as GuildTextBasedChannel)
|
||||
: null);
|
||||
const channelId = channelOrThread?.isThread() ? channelOrThread.parent?.id : channelIdOrThreadId;
|
||||
const threadId = channelOrThread?.isThread() ? channelOrThread.id : null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue