Skip to content

Commit 9e591cc

Browse files
committed
Bump version to 1.7.5 and enhance auto-publish logic
Updated the bot version from 1.7.4 to 1.7.5 in the Dockerfile and main.py. Introduced new command handling in the aclient class to call Functions.auto_publish under specific conditions, improving message publishing in announcement channels. Retained the load_dotenv() functionality for environment variable loading. Enhanced permission and message type checks to ensure proper context for auto-publishing.
1 parent e6d9e7e commit 9e591cc

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Dockerfile

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

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

main.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#Init
2525
discord.VoiceClient.warn_nacl = False
2626
load_dotenv()
27-
BOT_VERSION = '1.7.4'
27+
BOT_VERSION = '1.7.5'
2828
APP_FOLDER_NAME = 'AutoPublisher'
2929
BOT_NAME = 'AutoPublisher'
3030
if not os.path.exists(f'{APP_FOLDER_NAME}//Logs'):
@@ -228,9 +228,6 @@ async def __wrong_selection():
228228
'status - Set the status of the bot\n'
229229
'```')
230230

231-
channel = message.channel
232-
permissions = channel.permissions_for(channel.guild.me)
233-
234231
if message.author == bot.user:
235232
return
236233
if (
@@ -241,7 +238,10 @@ async def __wrong_selection():
241238
and not message.flags.crossposted
242239
and not message.flags.is_crossposted
243240
):
241+
channel = message.channel
242+
permissions = channel.permissions_for(channel.guild.me)
244243
await Functions.auto_publish(message, channel, permissions)
244+
245245
if message.guild is None and message.author.id == int(OWNERID):
246246
args = message.content.split(' ')
247247
program_logger.debug(args)

0 commit comments

Comments
 (0)