Skip to content

Commit

Permalink
修改发送消息时 httpException 返回的 message 字段内容
Browse files Browse the repository at this point in the history
  • Loading branch information
This-is-XiaoDeng committed Nov 12, 2023
1 parent 202bcbf commit 49bf37a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions basic_actions_v12.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ async def send_message(
parsed_message = await message_parser.parse_message(message)
try:
msg = await channel.send(**parsed_message) # type: ignore
except discord.HTTPException:
except discord.HTTPException as e:
logger.debug(traceback.format_exc())
return return_object.get(34000, "发送消息失败:消息过长!每条普通消息需要小于 2000 字符。")
return return_object.get(34000, str(e))
message_id = msg.id

return return_object.get(0, message_id=message_id, time=time.time())
Expand Down

0 comments on commit 49bf37a

Please sign in to comment.