Minor edits
This commit is contained in:
		
					parent
					
						
							
								8eb4ca32a1
							
						
					
				
			
			
				commit
				
					
						448f98ba35
					
				
			
		
					 6 changed files with 15 additions and 6 deletions
				
			
		|  | @ -1,4 +1,4 @@ | ||||||
| package net.hypr.doki.commands; | package net.hypr.doki.commands.levelling; | ||||||
| 
 | 
 | ||||||
| import com.freya02.botcommands.api.annotations.CommandMarker; | import com.freya02.botcommands.api.annotations.CommandMarker; | ||||||
| import com.freya02.botcommands.api.prefixed.CommandEvent; | import com.freya02.botcommands.api.prefixed.CommandEvent; | ||||||
|  | @ -1,4 +1,4 @@ | ||||||
| package net.hypr.doki.commands; | package net.hypr.doki.commands.levelling; | ||||||
| 
 | 
 | ||||||
| import com.freya02.botcommands.api.annotations.CommandMarker; | import com.freya02.botcommands.api.annotations.CommandMarker; | ||||||
| import com.freya02.botcommands.api.prefixed.BaseCommandEvent; | import com.freya02.botcommands.api.prefixed.BaseCommandEvent; | ||||||
|  | @ -1,4 +1,4 @@ | ||||||
| package net.hypr.doki.commands; | package net.hypr.doki.commands.utils; | ||||||
| 
 | 
 | ||||||
| import com.freya02.botcommands.api.annotations.CommandMarker; | import com.freya02.botcommands.api.annotations.CommandMarker; | ||||||
| import com.freya02.botcommands.api.prefixed.CommandEvent; | import com.freya02.botcommands.api.prefixed.CommandEvent; | ||||||
|  | @ -1,4 +1,4 @@ | ||||||
| package net.hypr.doki.commands; | package net.hypr.doki.commands.utils; | ||||||
| 
 | 
 | ||||||
| import com.freya02.botcommands.api.annotations.CommandMarker; | import com.freya02.botcommands.api.annotations.CommandMarker; | ||||||
| import com.freya02.botcommands.api.prefixed.CommandEvent; | import com.freya02.botcommands.api.prefixed.CommandEvent; | ||||||
|  | @ -1,4 +1,4 @@ | ||||||
| package net.hypr.doki.commands; | package net.hypr.doki.commands.utils; | ||||||
| 
 | 
 | ||||||
| import com.freya02.botcommands.api.annotations.CommandMarker; | import com.freya02.botcommands.api.annotations.CommandMarker; | ||||||
| import com.freya02.botcommands.api.prefixed.BaseCommandEvent; | import com.freya02.botcommands.api.prefixed.BaseCommandEvent; | ||||||
|  | @ -19,11 +19,20 @@ public class LevellingListener extends ListenerAdapter { | ||||||
|     @Override |     @Override | ||||||
|     public void onMessageReceived(MessageReceivedEvent event) { |     public void onMessageReceived(MessageReceivedEvent event) { | ||||||
|         Logger log = Logging.getLogger(); |         Logger log = Logging.getLogger(); | ||||||
|  | 
 | ||||||
|         /* Ignore the message if one of the following conditions is met: |         /* Ignore the message if one of the following conditions is met: | ||||||
|           - Message is from self user |           - Message is from self user | ||||||
|           - Message is from bot |           - Message is from a bot | ||||||
|           - Message is command (starts with bot prefix) |           - Message is command (starts with bot prefix) | ||||||
|  |           - Message is a Direct Message to the bot | ||||||
|         */ |         */ | ||||||
|  |         try { | ||||||
|  |             event.getGuild(); | ||||||
|  |         } catch (IllegalStateException ex) { | ||||||
|  |             log.debug("Ignoring direct message with ID {}", event.getMessageId()); | ||||||
|  |             return; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|         if ( |         if ( | ||||||
|                 Doki.getJDA().getSelfUser().getId().equals(event.getAuthor().getId()) || |                 Doki.getJDA().getSelfUser().getId().equals(event.getAuthor().getId()) || | ||||||
|                         event.getAuthor().isBot() || |                         event.getAuthor().isBot() || | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 floppydiskette
				floppydiskette