Some debugging
This commit is contained in:
parent
7d96f3ef18
commit
c3ee2fbc43
1 changed files with 2 additions and 1 deletions
3
index.js
3
index.js
|
@ -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;
|
||||||
|
|
Reference in a new issue