use embeds
This commit is contained in:
parent
500e16678d
commit
15b84e5f3b
1 changed files with 4 additions and 2 deletions
6
index.js
6
index.js
|
@ -1,4 +1,4 @@
|
||||||
import { REST, Routes, Client, Events, GatewayIntentBits } from 'discord.js';
|
import { REST, Routes, Client, Events, GatewayIntentBits, EmbedBuilder } from 'discord.js';
|
||||||
import { spawn } from "node:child_process";
|
import { spawn } from "node:child_process";
|
||||||
import { mkdir, cp } from 'node:fs/promises';
|
import { mkdir, cp } from 'node:fs/promises';
|
||||||
|
|
||||||
|
@ -52,7 +52,9 @@ client.on(Events.MessageCreate, async interaction => {
|
||||||
if (chunk.toString().length > 1) {
|
if (chunk.toString().length > 1) {
|
||||||
let str = chunk.toString();
|
let str = chunk.toString();
|
||||||
str = str.replaceAll(/user:([0-9]+)/g, '<@$1>');
|
str = str.replaceAll(/user:([0-9]+)/g, '<@$1>');
|
||||||
(channels[id] || interaction.channel).send(str);
|
|
||||||
|
const exampleEmbed = new EmbedBuilder().setColor(0x0099FF).setDescription(str);
|
||||||
|
(channels[id] || interaction.channel).send({ embeds: [exampleEmbed] });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
sessions[id].on('close', () => {
|
sessions[id].on('close', () => {
|
||||||
|
|
Loading…
Reference in a new issue