fix inline roll handling
This commit is contained in:
		
							parent
							
								
									1052e7d2e2
								
							
						
					
					
						commit
						46757b31bc
					
				| 
						 | 
					@ -21,8 +21,13 @@ export const messageCreateHandler = (message: DiscordenoMessage) => {
 | 
				
			||||||
      commands.handleMentions(message);
 | 
					      commands.handleMentions(message);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // return as we are done handling this command, unless the guild allows inline rolls
 | 
					    // Handle inline guilds if allowed
 | 
				
			||||||
    if (!inlineList.includes(message.guildId)) return;
 | 
					    if (inlineList.includes(message.guildId) && message.content.includes(config.prefix) && message.content.includes(config.prefix)) {
 | 
				
			||||||
 | 
					      const argSpaces = message.content.trim().split(/([ \n]+)/g);
 | 
				
			||||||
 | 
					      commands.roll(message, argSpaces, '');
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    // return as we are done handling this message
 | 
				
			||||||
 | 
					    return;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  log(LT.LOG, `Handling ${config.prefix}command message: ${JSON.stringify(message)}`);
 | 
					  log(LT.LOG, `Handling ${config.prefix}command message: ${JSON.stringify(message)}`);
 | 
				
			||||||
| 
						 | 
					@ -41,7 +46,6 @@ export const messageCreateHandler = (message: DiscordenoMessage) => {
 | 
				
			||||||
  argSpaces.shift();
 | 
					  argSpaces.shift();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // All commands below here
 | 
					  // All commands below here
 | 
				
			||||||
 | 
					 | 
				
			||||||
  switch (command) {
 | 
					  switch (command) {
 | 
				
			||||||
    case 'opt-out':
 | 
					    case 'opt-out':
 | 
				
			||||||
    case 'ignore-me':
 | 
					    case 'ignore-me':
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue