Skip to content

Commit

Permalink
added memberships to random-user
Browse files Browse the repository at this point in the history
  • Loading branch information
StarManTheGamer committed May 26, 2023
1 parent 0fd904c commit 88e57db
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/commands/random/randomUser.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Message, MessageEmbed } from 'discord.js'
import { dateUtils } from '../../utils/dateUtils.js'
import { randomUtils } from '../../utils/randomUtils.js'
import emojiUtils from '../../utils/emojiUtils.js'

export async function randomUser (message: Message, args: string[]) {
const randomId = randomUtils.randomInt(1, 34800)
Expand All @@ -23,9 +24,17 @@ export async function randomUser (message: Message, args: string[]) {

const data = randomData.data
const thumbnail = data.thumbnail
let badges = ' '

if (data.membershipType === 'plusDeluxe') {
badges += emojiUtils.plusdeluxe + ' '
}
if (data.membershipType === 'plus') {
badges += emojiUtils.plus + ' '
}

const embed = new MessageEmbed({
title: data.username,
title: data.username + badges,
url: `https://polytoria.com/user/${data.id}`,
description: data.description,
color: '#ff5454',
Expand Down

0 comments on commit 88e57db

Please sign in to comment.