mirror of
https://github.com/alterware/aw-bot.git
synced 2025-12-11 12:07:50 +00:00
fix: add black list here
This commit is contained in:
@@ -6,7 +6,7 @@ import discord
|
|||||||
from bot.ai.handle_request import forward_to_google_api
|
from bot.ai.handle_request import forward_to_google_api
|
||||||
from bot.log import logger
|
from bot.log import logger
|
||||||
from bot.utils import aware_utcnow, timeout_member, safe_truncate
|
from bot.utils import aware_utcnow, timeout_member, safe_truncate
|
||||||
from database import add_user_to_role
|
from database import add_user_to_role, is_user_blacklisted
|
||||||
|
|
||||||
BOT_LOG = 1112049391482703873
|
BOT_LOG = 1112049391482703873
|
||||||
GENERAL_CHANNEL = 1110531063744303138
|
GENERAL_CHANNEL = 1110531063744303138
|
||||||
@@ -65,6 +65,12 @@ async def handle_bot_mention(message, bot, no_context=False):
|
|||||||
)
|
)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
if is_user_blacklisted(message.author.id):
|
||||||
|
message.reply(
|
||||||
|
"You are blacklisted from using this command.", mention_author=True
|
||||||
|
)
|
||||||
|
return True
|
||||||
|
|
||||||
# Cooldown logic: max 1 use per minute per user
|
# Cooldown logic: max 1 use per minute per user
|
||||||
now = time.time()
|
now = time.time()
|
||||||
user_id = message.author.id
|
user_id = message.author.id
|
||||||
|
|||||||
Reference in New Issue
Block a user