refactor: ⚰️ Fixed some code smells
Fixed some code smells from https://deepsource.io/gh/ZynerOrg/xyter/run/8058c521-9330-4c14-94b2-0c3a7d9d824b/javascript/
This commit is contained in:
parent
121ed77042
commit
89c7fe952b
2 changed files with 3 additions and 5 deletions
|
@ -72,7 +72,7 @@ export default {
|
|||
|
||||
logger.silly(createGuildMember);
|
||||
|
||||
const reputationType = async (reputation: number) => {
|
||||
const reputationType = (reputation: number) => {
|
||||
if (reputation < 0) return `negative reputation of ${reputation}`;
|
||||
if (reputation > 0) return `positive reputation of ${reputation}`;
|
||||
return "neutral reputation";
|
||||
|
@ -86,10 +86,10 @@ export default {
|
|||
)
|
||||
.setDescription(
|
||||
optionAccount
|
||||
? `${optionAccount} have a ${await reputationType(
|
||||
? `${optionAccount} have a ${reputationType(
|
||||
createGuildMember.user.reputationsEarned
|
||||
)}`
|
||||
: `You have a ${await reputationType(
|
||||
: `You have a ${reputationType(
|
||||
createGuildMember.user.reputationsEarned
|
||||
)}`
|
||||
)
|
||||
|
|
|
@ -46,8 +46,6 @@ export default {
|
|||
const minutes = Math?.floor(totalSeconds / 60);
|
||||
const seconds = Math?.floor(totalSeconds % 60);
|
||||
|
||||
const uptime = `${days} days, ${hours} hours, ${minutes} minutes and ${seconds} seconds`;
|
||||
|
||||
// // Initialize a storage for the user ids
|
||||
// const userIds = new Set();
|
||||
// // Iterate over all guilds (always cached)
|
||||
|
|
Loading…
Add table
Reference in a new issue