feat: quote #42

Merged
Anri merged 16 commits from feat/citation into main 2022-07-27 13:00:24 +02:00
Showing only changes of commit a9c076247b - Show all commits

View file

@ -1,3 +1,5 @@
import { GuildMember } from 'discord.js';
/** /**
* Log module status. * Log module status.
* @param {string} name Module name * @param {string} name Module name
@ -58,3 +60,19 @@ export const isImage = (filename: string) => {
/jpg|jpeg|png|webp|gif/ /jpg|jpeg|png|webp|gif/
)); ));
}; };
/**
* String with pseudo and nickname if available.
* @param member Member
* @returns string
*/
export const userWithNickname = (member: GuildMember) => {
if (!member) {
return undefined;
}
if (member.nickname) {
return `${member.nickname} (${member.user.tag})`;
} else {
return member.user.tag;
}
};