Skip to content

Commit

Permalink
Text formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Glazelf authored Jun 17, 2024
1 parent 2aa4c10 commit 46c5417
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions commands/owner/send.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default async (client, interaction, ephemeral) => {
let attachment = null;
if (attachmentArg) attachment = attachmentArg.url;
let target;
let textMessageBlock = Discord.codeBlock(textMessage);
let textMessageBlock = Discord.codeBlock("fix", textMessage);
if (userIDArg || channelIDArg) {
try {
if (channelIDArg) target = await client.channels.fetch(channelIDArg);
Expand All @@ -32,8 +32,8 @@ export default async (client, interaction, ephemeral) => {
};
if (!target) return sendMessage({ client: client, interaction: interaction, content: `I could not find a user or channel with that ID.` });
let targetFormat = null;
if (channelIDArg) targetFormat = `${target.name} (${target.id}) in **${target.guild.name}** (${target.guild.id})`;
if (userIDArg) targetFormat = `${target.username} (${target.id})`;
if (channelIDArg) targetFormat = `**${target.name}** (${target.id}) in **${target.guild.name}** (${target.guild.id})`;
if (userIDArg) targetFormat = `**${target.username}** (${target.id})`;
try {
let messageObject = { content: textMessage };
if (attachment) messageObject["files"] = [attachment];
Expand Down Expand Up @@ -75,4 +75,4 @@ export const config = {
type: Discord.ApplicationCommandOptionType.Boolean,
description: "Whether the reply will be private."
}]
};
};

0 comments on commit 46c5417

Please sign in to comment.