Skip to content

Commit

Permalink
Fixed underscores
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick-NCSU committed Sep 11, 2021
1 parent 629e3a8 commit e06a4d7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion messagecommands/banlist.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ async function list(message) {
const player2 = await fetch(`https://api.mojang.com/user/profiles/${player.id}/names`).then(response => response.json()).catch( reason => {});
str += 'IGN: ' + player2[player2.length - 1].name + '\n';
}
return await message.reply(str);
return await message.reply(str.replace(/[*_~]/g, "\\$&"));
}

async function search(id, message) {
Expand Down
4 changes: 2 additions & 2 deletions messagecommands/check.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const token = require('../index.js');
if(message.channel != '795130167696556093' && message.channel != '728402518014689333') return;
const igns = command.slice(1);
const players = [];
let result = '';
let result = '```\n';
for(const ign of igns) {
const player = await fetch(`https://api.mojang.com/users/profiles/minecraft/${ign}`).then(response => response.json()).catch( reason => {});
if(player) {
Expand Down Expand Up @@ -58,6 +58,6 @@ const token = require('../index.js');
result += '\t' + player.name + ' (**Banlist**)\n';
}
}
await message.channel.send(result);
await message.channel.send(result + '```');
},
};

0 comments on commit e06a4d7

Please sign in to comment.