rename log headers

This commit is contained in:
Emily 2021-03-04 13:08:44 +11:00
parent ee549ba08d
commit cc2faf7646
1 changed files with 8 additions and 6 deletions

View File

@ -92,9 +92,9 @@ class Functions {
async getUser (id) { async getUser (id) {
if (this.client.users.has(id)) return this.client.users.get(id); if (this.client.users.has(id)) return this.client.users.get(id);
this.client.logger.debug('REST_FETCH_USER', 'Accessing rest API...'); this.client.logger.debug('REST_GET_USER', 'Accessing rest API...');
const user = await this.client.getRESTUser(id).catch(err => { const user = await this.client.getRESTUser(id).catch(err => {
this.client.logger.error('USER_FETCH_ERROR', err); this.client.logger.error('USER_GET_ERROR', err);
}); });
if (user) { if (user) {
@ -107,9 +107,9 @@ class Functions {
async getMember (guild, memberID) { async getMember (guild, memberID) {
if (guild.members.has(memberID)) return guild.members.get(memberID); if (guild.members.has(memberID)) return guild.members.get(memberID);
this.client.logger.debug('REST_FETCH_MEMBER', 'Accessing rest API...'); this.client.logger.debug('REST_GET_MEMBER', 'Accessing rest API...');
const member = await this.client.getRESTGuildMember(guild.id, memberID).catch(err => { const member = await this.client.getRESTGuildMember(guild.id, memberID).catch(err => {
this.client.logger.error('MEMBER_FETCH_ERROR', err); this.client.logger.error('MEMBER_GET_ERROR', err);
}); });
if (member) { if (member) {
@ -122,9 +122,9 @@ class Functions {
async getGuild (id) { async getGuild (id) {
if (this.client.guilds.has(id)) return this.client.guilds.get(id); if (this.client.guilds.has(id)) return this.client.guilds.get(id);
this.client.logger.debug('REST_FETCH_GUILD', 'Accessing rest API...'); this.client.logger.debug('REST_GET_GUILD', 'Accessing rest API...');
const guild = await this.client.getRESTGuild(id).catch(err => { const guild = await this.client.getRESTGuild(id).catch(err => {
this.client.logger.error('GUILD_FETCH_ERROR', err); this.client.logger.error('GUILD_GET_ERROR', err);
}); });
if (guild) { if (guild) {
@ -135,6 +135,8 @@ class Functions {
return; return;
} }
async
async clean (text) { async clean (text) {
if (text && text.constructor.name === 'Promise') { if (text && text.constructor.name === 'Promise') {
text = await text; text = await text;