This commit is contained in:
janderedev 2022-04-24 14:06:02 +02:00
parent 96446b3e1d
commit 2b1bb07be1
Signed by: Lea
GPG key ID: 5D5E18ACB990F57A

View file

@ -80,6 +80,9 @@ client.on('interactionCreate', async interaction => {
const request = await BRIDGE_REQUESTS.findOne({ id: id });
if (!request || request.expires < Date.now()) return await interaction.reply('Unknown ID.');
const bridgedCount = await BRIDGE_CONFIG.count({ discord: interaction.channelId });
if (bridgedCount > 0) return await interaction.reply('This channel is already bridged.');
const webhook = await (interaction.channel as TextChannel)
.createWebhook('AutoMod Bridge', { avatar: client.user?.avatarURL() });