prevent announcement when description contains !private
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				Compile the repository / compile (pull_request) Successful in 1m43s
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	Compile the repository / compile (pull_request) Successful in 1m43s
				
			This commit is contained in:
		@@ -20,6 +20,10 @@ export async function execute(event: GuildScheduledEvent) {
 | 
			
		||||
 | 
			
		||||
        if (event.description.includes("!wp")) {
 | 
			
		||||
            logger.info("Got manual create event of watchparty event!", { guildId, requestId })
 | 
			
		||||
            if(event.description.includes("!private")) {
 | 
			
		||||
                logger.info("Event description contains \"!private\". Won't announce.", { guildId, requestId })
 | 
			
		||||
                return
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            const channel: Maybe<TextChannel> = client.getAnnouncementChannelForGuild(guildId)
 | 
			
		||||
 | 
			
		||||
@@ -32,7 +36,7 @@ export async function execute(event: GuildScheduledEvent) {
 | 
			
		||||
 | 
			
		||||
            channel.send(message)
 | 
			
		||||
        } else {
 | 
			
		||||
            logger.debug("Got GuildScheduledEventCreate event but no !wp in description. Not creating manual wp announcement.")
 | 
			
		||||
            logger.debug("Got GuildScheduledEventCreate event but no !wp in description. Not creating manual wp announcement.", { guildId, requestId })
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
    } catch (error) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user