Fix message formatting
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { TextChannel, type Message } from "discord.js";
|
||||
import { underline } from "../utils/message.ts";
|
||||
import { italic, underline } from "../utils/message.ts";
|
||||
|
||||
export default function attemptReplyAuthorMessage(
|
||||
authorMessage: Message,
|
||||
@@ -16,10 +16,11 @@ export default function attemptReplyAuthorMessage(
|
||||
if (!msg) return;
|
||||
|
||||
const { id, guildId, channelId, author } = msg;
|
||||
|
||||
if (!author.globalName) return;
|
||||
|
||||
const messageUrl = `https://discord.com/channels/${guildId}/${channelId}/${id}`;
|
||||
replyMessage += `\n- Mensagem original ${++index} (por ${underline(author.globalName)}): ${messageUrl}`;
|
||||
replyMessage += `\n- Mensagem original ${++index} (por ${italic(author.globalName)}): ${messageUrl}`;
|
||||
}
|
||||
|
||||
authorMessage
|
||||
|
||||
@@ -27,3 +27,7 @@ export function transformMessageArrayInMap(
|
||||
export function underline(message: string): string {
|
||||
return `__${message}__`;
|
||||
}
|
||||
|
||||
export function italic(message: string): string {
|
||||
return `*${message}*`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user