Commit 43c085c0 authored by George Peter Banyard's avatar George Peter Banyard

Fix typos

parent 503fdb2e
......@@ -33,7 +33,7 @@ const DiscordBotClient = new Discord.Client({CLIENT_OPTIONS});
/**
* On message check if it starts with the prefix to execute commands:
* See README for more informations.
* See README for more information.
*/
DiscordBotClient.on('message', async message =>
{
......@@ -167,27 +167,27 @@ DiscordBotClient.on('message', async message =>
return {message:i18n.text.DEFAULT_ERROR};
}
}
case 'profil':
case 'profile':
if (message.mentions.members.size !== 0) {
member = message.mentions.members.first();
}
let getProfilResponse = async () => {
let getProfileResponse = async () => {
try {
let profilData = await rpg.getProfil(member.id);
if (profilData === null) {
let profileData = await rpg.getProfile(member.id);
if (profileData === null) {
return {message:i18n.text.RPG_MEMBER_NOT_REGISTERED.replace('{member}',member.displayName)};
} else {
return {message:{embed:i18n.RPG_PROFIL_EMBED(member.displayName, profilData)}};
return {message:{embed:i18n.RPG_PROFIL_EMBED(member.displayName, profileData)}};
}
} catch (errorCode) {
if (errorCode === rpgConst.CODE_TABLE_NOT_EXITING) {
return await getProfilResponse();
return await getProfileResponse();
} else {
return {message:i18n.text.DB_ERROR};
}
}
};
return await getProfilResponse();
return await getProfileResponse();
case 'list':
let page = Number(arguments[1]) > 0 ? Number(arguments[1]) : 1;
......
......@@ -76,12 +76,12 @@ const register = (userId) => {
};
/**
* Fetches profil data of member in the DataBase.
* Fetches profile data of member in the DataBase.
*
* @param userId
* @returns {Promise}
*/
let getProfil = (userId) => {
let getProfile = (userId) => {
return new Promise(async (resolve, reject) => {
try {
resolve(await getUserData(userId));
......@@ -393,11 +393,11 @@ const revive = (userId) => {
};
module.exports.register = register;
module.exports.getProfil = getProfil;
module.exports.getProfile = getProfile;
module.exports.getNbPlayers = getNbPlayers;
module.exports.getList = getList;
module.exports.daily = daily;
module.exports.attack = attack;
module.exports.heal = heal;
module.exports.give = give;
module.exports.revive = revive;
module.exports.revive = revive;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment