Skip to content

Commit ee2e3be

Browse files
committed
fix: use createDefaultEmbed
1 parent eb36abe commit ee2e3be

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/commands/pm.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import { ChatInputCommand } from '@/types'
22
import {
33
ChatInputCommandInteraction,
4-
EmbedBuilder,
54
GuildMemberRoleManager,
65
SlashCommandBuilder,
76
} from 'discord.js'
87
import process from 'node:process'
98
import { PERMISSION_ERROR_TEXT } from '@/data'
109
import { info } from '@/logging/logger'
10+
import { createDefaultEmbed } from '@/utils'
1111

1212
export const pmCommand: ChatInputCommand = {
1313
data: new SlashCommandBuilder()
@@ -51,10 +51,10 @@ export const pmCommand: ChatInputCommand = {
5151
const title = interaction.options.getString('title', false)
5252
const member = await interaction.guild.members.fetch(id)
5353

54-
const embed = new EmbedBuilder()
55-
.setColor(0x1bd96a)
56-
.setTitle(title ? title : 'Message from a moderator')
57-
.setDescription(message)
54+
const embed = createDefaultEmbed({
55+
title: title ? title : 'Message from a moderator',
56+
description: message,
57+
})
5858

5959
await member.user.send({ embeds: [embed] })
6060
await interaction.reply({

0 commit comments

Comments
 (0)