Merge pull request #15 from r-Overwatch2/main #18
@@ -3,7 +3,7 @@ import { AuditLogEvent, Events, GuildAuditLogsEntry, PermissionFlagsBits, User }
 | 
				
			|||||||
import { getGuildSetting } from "../tools/data";
 | 
					import { getGuildSetting } from "../tools/data";
 | 
				
			||||||
import { Badword, database } from "../data";
 | 
					import { Badword, database } from "../data";
 | 
				
			||||||
import { IsNull } from "typeorm";
 | 
					import { IsNull } from "typeorm";
 | 
				
			||||||
import getDefaultEmbed, { getFailedEmbed } from "../tools/defaultEmbeds";
 | 
					import getDefaultEmbed, { getFailedEmbed, getUserReportEmbed } from "../tools/defaultEmbeds";
 | 
				
			||||||
import { getGuildChannel } from "../tools/discord";
 | 
					import { getGuildChannel } from "../tools/discord";
 | 
				
			||||||
import { Color, Emoji } from "../tools/design";
 | 
					import { Color, Emoji } from "../tools/design";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -89,6 +89,13 @@ client.on(Events.ChannelCreate, async (newChannel) => {
 | 
				
			|||||||
        return;
 | 
					        return;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (responsibleUser) {
 | 
				
			||||||
 | 
					        const embed = getUserReportEmbed(guild.name, newChannel.name);
 | 
				
			||||||
 | 
					        responsibleUser.send({
 | 
				
			||||||
 | 
					            embeds: [embed]
 | 
				
			||||||
 | 
					        }).catch(() => {});
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (!logChannel || !logChannel.isTextBased()) return;
 | 
					    if (!logChannel || !logChannel.isTextBased()) return;
 | 
				
			||||||
    const embed = getDefaultEmbed();
 | 
					    const embed = getDefaultEmbed();
 | 
				
			||||||
    embed.setTitle(`${Emoji.SECURITY_CHALLENGE_FAILED} Blocked word detected`);
 | 
					    embed.setTitle(`${Emoji.SECURITY_CHALLENGE_FAILED} Blocked word detected`);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,7 +3,7 @@ import { AuditLogEvent, Events, GuildAuditLogsEntry, PermissionFlagsBits, User }
 | 
				
			|||||||
import { getGuildSetting } from "../tools/data";
 | 
					import { getGuildSetting } from "../tools/data";
 | 
				
			||||||
import { Badword, database } from "../data";
 | 
					import { Badword, database } from "../data";
 | 
				
			||||||
import { IsNull } from "typeorm";
 | 
					import { IsNull } from "typeorm";
 | 
				
			||||||
import getDefaultEmbed, { getFailedEmbed } from "../tools/defaultEmbeds";
 | 
					import getDefaultEmbed, { getFailedEmbed, getUserReportEmbed } from "../tools/defaultEmbeds";
 | 
				
			||||||
import { getGuildChannel } from "../tools/discord";
 | 
					import { getGuildChannel } from "../tools/discord";
 | 
				
			||||||
import { Color, Emoji } from "../tools/design";
 | 
					import { Color, Emoji } from "../tools/design";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -89,6 +89,13 @@ client.on(Events.ChannelUpdate, async (oldChannel, newChannel) => {
 | 
				
			|||||||
        return;
 | 
					        return;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (responsibleUser) {
 | 
				
			||||||
 | 
					        const embed = getUserReportEmbed(guild.name, newChannel.name);
 | 
				
			||||||
 | 
					        responsibleUser.send({
 | 
				
			||||||
 | 
					            embeds: [embed]
 | 
				
			||||||
 | 
					        }).catch(() => {});
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (!logChannel || !logChannel.isTextBased()) return;
 | 
					    if (!logChannel || !logChannel.isTextBased()) return;
 | 
				
			||||||
    const embed = getDefaultEmbed();
 | 
					    const embed = getDefaultEmbed();
 | 
				
			||||||
    embed.setTitle(`${Emoji.SECURITY_CHALLENGE_FAILED} Blocked word detected`);
 | 
					    embed.setTitle(`${Emoji.SECURITY_CHALLENGE_FAILED} Blocked word detected`);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user