Skip to content

Commit 576439d

Browse files
committed
Bump version to 1.7.11 and add publish delay feature
1 parent 064db2b commit 576439d

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ LABEL maintainer="Discord: pika.pika.no.mi (970119359840284743)" \
2828
description="This bot automatically publishes messages in announcement channels on discord." \
2929
release=$BUILD_DATE \
3030
url="https://github.com/Serpensin/DiscordBots-AutoPublisher" \
31-
version="1.7.10"
31+
version="1.7.11"
3232

3333
CMD ["python3", "main.py"]

main.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Import
1+
# Import
22
import time
33

44
startupTime_start = time.time()
@@ -23,7 +23,7 @@
2323
# Init
2424
discord.VoiceClient.warn_nacl = False
2525
load_dotenv()
26-
BOT_VERSION = "1.7.10"
26+
BOT_VERSION = "1.7.11"
2727
APP_FOLDER_NAME = "AutoPublisher"
2828
BOT_NAME = "AutoPublisher"
2929
if not os.path.exists(f"{APP_FOLDER_NAME}//Logs"):
@@ -60,6 +60,7 @@
6060
SUPPORT_ID = os.getenv("SUPPORT_SERVER")
6161
TOPGG_TOKEN = os.getenv("TOPGG_TOKEN")
6262
LOG_LEVEL = os.getenv("LOG_LEVEL")
63+
PUBLISH_DELAY_SECONDS = 10
6364

6465
# Set-up Logging
6566
LOG_FOLDER = f"{APP_FOLDER_NAME}//Logs//"
@@ -394,6 +395,7 @@ async def auto_publish(
394395
await message.add_reaction("\U0001f4e2") # 📢
395396

396397
try:
398+
await asyncio.sleep(PUBLISH_DELAY_SECONDS)
397399
await message.publish()
398400
except discord.HTTPException as e:
399401
if e.code == 50068:

0 commit comments

Comments
 (0)