Add a warning message to the text channel
This commit is contained in:
parent
dd73aaf35c
commit
4d354a3661
9
index.js
9
index.js
|
@ -189,6 +189,15 @@ client.on("voiceStateUpdate", async (oldState, newState) => {
|
||||||
type: Discord.ChannelType.GuildVoice,
|
type: Discord.ChannelType.GuildVoice,
|
||||||
parent: row.voice_category_id
|
parent: row.voice_category_id
|
||||||
}).then((channel) => {
|
}).then((channel) => {
|
||||||
|
channel.send({
|
||||||
|
embeds: [
|
||||||
|
{
|
||||||
|
color: 0xff0000,
|
||||||
|
title: "Temporary Voice Channel",
|
||||||
|
description: `This is a temporary voice channel created by ${newState.member.user.tag}.\nThis voice channel and the messages within will be deleted when the channel is empty!`,
|
||||||
|
}
|
||||||
|
]
|
||||||
|
});
|
||||||
// Move the user to the new channel
|
// Move the user to the new channel
|
||||||
newState.setChannel(channel);
|
newState.setChannel(channel);
|
||||||
// Update the database
|
// Update the database
|
||||||
|
|
Loading…
Reference in a new issue