mirror of
https://github.com/janderedev/automod.git
synced 2024-12-22 18:55:28 +00:00
i forgor
This commit is contained in:
parent
96446b3e1d
commit
2b1bb07be1
|
@ -80,6 +80,9 @@ client.on('interactionCreate', async interaction => {
|
||||||
const request = await BRIDGE_REQUESTS.findOne({ id: id });
|
const request = await BRIDGE_REQUESTS.findOne({ id: id });
|
||||||
if (!request || request.expires < Date.now()) return await interaction.reply('Unknown 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)
|
const webhook = await (interaction.channel as TextChannel)
|
||||||
.createWebhook('AutoMod Bridge', { avatar: client.user?.avatarURL() });
|
.createWebhook('AutoMod Bridge', { avatar: client.user?.avatarURL() });
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue