mirror of
				https://github.com/keanuplayz/TravBot-v3.git
				synced 2024-08-15 02:33:12 +00:00 
			
		
		
		
	Fixed some miscellaneous errors
This commit is contained in:
		
							parent
							
								
									203c541025
								
							
						
					
					
						commit
						4056c4ac0b
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		|  | @ -16,14 +16,14 @@ export default new NamedCommand({ | |||
|                 } | ||||
|             } | ||||
|         } else if (hasPermission(author, member, PERMISSIONS.BOT_SUPPORT)) { | ||||
|             if (guild!.me?.hasPermission(Permissions.FLAGS.MANAGE_MESSAGES)) message.delete(); | ||||
|             if (guild!.me?.permissions.has(Permissions.FLAGS.MANAGE_MESSAGES)) message.delete(); | ||||
| 
 | ||||
|             const messages = await channel.messages.fetch({ | ||||
|                 limit: 100 | ||||
|             }); | ||||
|             const travMessages = messages.filter((msg) => msg.author.id === client.user!.id); | ||||
| 
 | ||||
|             send(`Found ${travMessages.size} messages to delete.`).then((msg) => msg.delete({timeout: 5000})); | ||||
|             send(`Found ${travMessages.size} messages to delete.`).then((msg) => setTimeout(() => msg.delete(), 5000)); | ||||
| 
 | ||||
|             // It's better to go through the bot's own messages instead of calling bulkDelete which requires MANAGE_MESSAGES.
 | ||||
|             for (const message of messages.values()) { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue