diff --git a/.env.template b/.env.template index 33148ee..8933949 100644 --- a/.env.template +++ b/.env.template @@ -7,7 +7,7 @@ # any secret values. BOT_TOKEN= -BOT_VER=3.0.1 +BOT_VER=3.0.2 BOT_AUTHOR=Vylpes -BOT_DATE=24 Apr 2022 +BOT_DATE=09 May 2022 BOT_OWNERID=147392775707426816 \ No newline at end of file diff --git a/src/commands/501231711271780357/lobby.ts b/src/commands/501231711271780357/lobby.ts index 6d3a58c..58793bf 100644 --- a/src/commands/501231711271780357/lobby.ts +++ b/src/commands/501231711271780357/lobby.ts @@ -116,6 +116,15 @@ export default class Lobby extends Command { return; } + const lobby = await eLobby.FetchOneByChannelId(channel.id); + + if (lobby) { + const errorEmbed = new ErrorEmbed(context, "This channel has already been setup."); + errorEmbed.SendToCurrentChannel(); + + return; + } + const entity = new eLobby(channel.id, role.id, cooldown, gameName); await entity.Save(eLobby, entity);