i forgor
This commit is contained in:
parent
96446b3e1d
commit
2b1bb07be1
1 changed files with 3 additions and 0 deletions
|
@ -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