mirror of
https://github.com/alterware/aw-bot.git
synced 2025-12-10 11:37:50 +00:00
fix: missing await
This commit is contained in:
@@ -64,6 +64,9 @@ async def handle_bot_mention(message, bot, no_context=False):
|
||||
|
||||
# Check if the message is in an allowed channel
|
||||
if message.channel.id not in ALLOWED_CHANNELS:
|
||||
logger.debug(
|
||||
f"User {message.author} attempted to use AI in non-allowed channel: {message.channel.name}"
|
||||
)
|
||||
await message.reply(
|
||||
"The AI cannot used in this channel.",
|
||||
mention_author=True,
|
||||
@@ -71,8 +74,13 @@ async def handle_bot_mention(message, bot, no_context=False):
|
||||
return True
|
||||
|
||||
if is_user_blacklisted(message.author.id):
|
||||
message.reply(
|
||||
"You are blacklisted from using this command.", mention_author=True
|
||||
logger.warning(
|
||||
f"Blacklisted user {message.author} (ID: {message.author.id}) attempted to use AI"
|
||||
)
|
||||
await message.reply(
|
||||
"**Time Travel Required!**\n"
|
||||
"You'll gain access to this feature on **August 12th, 2036**.\n",
|
||||
mention_author=True,
|
||||
)
|
||||
return True
|
||||
|
||||
|
||||
@@ -80,9 +80,9 @@ async def timeout_member(
|
||||
|
||||
try:
|
||||
# Debug: Print the member object and timeout duration
|
||||
logger.debug(f"Debug: Attempting to timeout member {member} (ID: {member.id}).")
|
||||
logger.debug(f"Debug: Timeout duration set to {duration}.")
|
||||
logger.debug(f"Debug: Reason: {reason}")
|
||||
logger.debug(f"Attempting to timeout member {member} (ID: {member.id}).")
|
||||
logger.debug(f"Timeout duration set to {duration}.")
|
||||
logger.debug(f"Reason: {reason}")
|
||||
|
||||
await member.timeout(duration, reason=reason)
|
||||
logger.info(f"Successfully timed out {member}.")
|
||||
|
||||
Reference in New Issue
Block a user