Fix writeFileSync data
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				continuous-integration/drone/push Build is passing
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	continuous-integration/drone/push Build is passing
				
			This commit is contained in:
		
							parent
							
								
									4e51dafdc0
								
							
						
					
					
						commit
						e79053c834
					
				
					 2 changed files with 13 additions and 10 deletions
				
			
		| 
						 | 
					@ -7,3 +7,6 @@ services:
 | 
				
			||||||
    image: registry.cliffbreak.de/trellobot
 | 
					    image: registry.cliffbreak.de/trellobot
 | 
				
			||||||
    environment:
 | 
					    environment:
 | 
				
			||||||
      NODE_ENV: production 
 | 
					      NODE_ENV: production 
 | 
				
			||||||
 | 
					    volumes: 
 | 
				
			||||||
 | 
					      - './conf.json:/usr/src/app/conf.json'
 | 
				
			||||||
 | 
					      - './auth:/usr/src/app/.auth'
 | 
				
			||||||
							
								
								
									
										10
									
								
								trellobot.js
									
										
									
									
									
								
							
							
						
						
									
										10
									
								
								trellobot.js
									
										
									
									
									
								
							| 
						 | 
					@ -316,19 +316,19 @@ events.on('updateCheckItemStateOnCard', (event, board) => {
 | 
				
			||||||
events.on('maxId', (id) => {
 | 
					events.on('maxId', (id) => {
 | 
				
			||||||
    if (latestActivityID == id) return
 | 
					    if (latestActivityID == id) return
 | 
				
			||||||
    latestActivityID = id
 | 
					    latestActivityID = id
 | 
				
			||||||
    fs.writeFileSync('.latestActivityID', id)
 | 
					    fs.writeFileSync('.latestActivityID', id.toString())
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const send = (embed, content = ``) => conf.channel.send(`${content} ${conf.contentString}`, {embed:embed}).catch(err => console.error(err))
 | 
					const send = (embed, content = ``) => conf.channel.send(`${content} ${conf.contentString}`, { embed: embed }).catch(err => console.error(err))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const eventEnabled = (type) => conf.enabledEvents.length > 0 ? conf.enabledEvents.includes(type) : true
 | 
					const eventEnabled = (type) => conf.enabledEvents.length > 0 ? conf.enabledEvents.includes(type) : true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const logEventFire = (event) => console.log(`${new Date(event.date).toUTCString()} - ${event.type} fired`)
 | 
					const logEventFire = (event) => console.log(`${new Date(event.date).toUTCString()} - ${event.type} fired`)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const getEmbedBase = (event) => new Discord.RichEmbed()
 | 
					const getEmbedBase = (event) => new Discord.RichEmbed()
 | 
				
			||||||
        .setFooter(`${conf.guild.members.get(bot.user.id).displayName} • ${event.data.board.name} [${event.data.board.shortLink}]`, bot.user.displayAvatarURL)
 | 
					    .setFooter(`${conf.guild.members.get(bot.user.id).displayName} • ${event.data.board.name} [${event.data.board.shortLink}]`, bot.user.displayAvatarURL)
 | 
				
			||||||
        .setTimestamp(event.hasOwnProperty(`date`) ? event.date : Date.now())
 | 
					    .setTimestamp(event.hasOwnProperty(`date`) ? event.date : Date.now())
 | 
				
			||||||
        .setColor("#127ABD")
 | 
					    .setColor("#127ABD")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//  Converts Trello @username mentions in titles to Discord mentions, finds channel and role mentions, and mirros Discord user mentions outside the embed
 | 
					//  Converts Trello @username mentions in titles to Discord mentions, finds channel and role mentions, and mirros Discord user mentions outside the embed
 | 
				
			||||||
const convertMentions = (embed, event) => {
 | 
					const convertMentions = (embed, event) => {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue