mirror of
https://github.com/migatu/conjurer.git
synced 2026-07-15 14:22:13 +00:00
Fix 2.0
This commit is contained in:
@@ -274,22 +274,25 @@ async def on_message(message):
|
|||||||
if "conjurer:" in message.content:
|
if "conjurer:" in message.content:
|
||||||
async with channel.typing():
|
async with channel.typing():
|
||||||
logger.debug("Procedura chatu")
|
logger.debug("Procedura chatu")
|
||||||
message.content = message.content.replace("conjurer: ", "")
|
|
||||||
message.content = message.content.replace(str(client.user), "")
|
|
||||||
prompt = message.content
|
|
||||||
|
|
||||||
|
message.content = message.content.replace("conjurer: ", "")
|
||||||
if message.author.nick:
|
if message.author.nick:
|
||||||
username = message.author.nick
|
username = message.author.nick
|
||||||
else:
|
else:
|
||||||
username = message.author.name
|
username = message.author.name
|
||||||
vykidailo = False
|
vykidailo = False
|
||||||
bartender = False
|
bartender = False
|
||||||
|
if kondziu_mentioned:
|
||||||
|
prompt = message.clean_content
|
||||||
|
else:
|
||||||
|
prompt = message.content
|
||||||
for role in message.author.roles:
|
for role in message.author.roles:
|
||||||
if role.name == "Vykidailo":
|
if role.name == "Vykidailo":
|
||||||
vykidailo = True
|
vykidailo = True
|
||||||
if role.name == "Bartender":
|
if role.name == "Bartender":
|
||||||
bartender = True
|
bartender = True
|
||||||
global MESSAGE_TABLE # pylint: disable=global-statement
|
global MESSAGE_TABLE # pylint: disable=global-statement
|
||||||
|
|
||||||
result, MESSAGE_TABLE = await handle_response(
|
result, MESSAGE_TABLE = await handle_response(
|
||||||
prompt, vykidailo, bartender, MESSAGE_TABLE, username, False
|
prompt, vykidailo, bartender, MESSAGE_TABLE, username, False
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user