Some debugging

This commit is contained in:
CBenni 2018-01-07 15:42:19 +01:00
parent 7d96f3ef18
commit c3ee2fbc43

View file

@ -175,6 +175,7 @@ client.login(config.discord.token).catch(error => {
const discordAvatarRegex = /(https:\/\/cdn.discordapp.com\/avatars\/\w+\/\w+\.(\w+)\?size=)(\w+)/; const discordAvatarRegex = /(https:\/\/cdn.discordapp.com\/avatars\/\w+\/\w+\.(\w+)\?size=)(\w+)/;
function findEmoji(message) { function findEmoji(message) {
console.log('Mentions:', message.mentions);
// find a user mention // find a user mention
if (message.mentions.members.size > 0) { if (message.mentions.members.size > 0) {
const mentionedMember = message.mentions.members.first(); const mentionedMember = message.mentions.members.first();
@ -260,7 +261,7 @@ client.on('message', async message => {
commandParsed = /^([/\\])(\w+)\b/.exec(messageSplit[i]); commandParsed = /^([/\\])(\w+)\b/.exec(messageSplit[i]);
if (commandParsed) { if (commandParsed) {
const [, direction, command] = commandParsed; const [, direction, command] = commandParsed;
console.log('Got command ', direction, command, direction === '\\' ? 'flipped' : 'not flipped'); console.log('Got command ', direction, command, direction === '\\' ? 'flipped' : 'not flipped', emoji);
if (templates[command]) { if (templates[command]) {
count++; count++;
name += command; name += command;