3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-10 12:25:02 +00:00

Merge branch 'master' into 220601_docker_wip

This commit is contained in:
Dragory 2022-06-26 14:35:32 +03:00
commit b48b93a6de
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
36 changed files with 242 additions and 178 deletions

View file

@ -38,7 +38,7 @@ export const AlertAction = automodAction({
const channel = pluginData.guild.channels.cache.get(actionConfig.channel as Snowflake);
const logs = pluginData.getPlugin(LogsPlugin);
if (channel && channel instanceof TextChannel) {
if (channel?.isText()) {
const text = actionConfig.text;
const theMessageLink =
contexts[0].message && messageLink(pluginData.guild.id, contexts[0].message.channel_id, contexts[0].message.id);

View file

@ -36,7 +36,7 @@ export const ReplyAction = automodAction({
.filter((c) => c.message?.channel_id)
.filter((c) => {
const channel = pluginData.guild.channels.cache.get(c.message!.channel_id as Snowflake);
return channel instanceof TextChannel || channel instanceof ThreadChannel;
return channel?.isText();
});
const contextsByChannelId = contextsWithTextChannels.reduce((map: Map<string, AutomodContext[]>, context) => {