File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 11import { ChatInputCommand } from '@/types'
22import {
33 ChatInputCommandInteraction ,
4- EmbedBuilder ,
54 GuildMemberRoleManager ,
65 SlashCommandBuilder ,
76} from 'discord.js'
87import process from 'node:process'
98import { PERMISSION_ERROR_TEXT } from '@/data'
109import { info } from '@/logging/logger'
10+ import { createDefaultEmbed } from '@/utils'
1111
1212export 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 ( {
You can’t perform that action at this time.
0 commit comments