QQ可以使用xml的方式发送消息,以下为了方便描述统称为卡片。
通过机器人的API进行发送xml即可,但是如果选择发送xml,那么其他如[image=xxx]、[@xxx]这些命令就不可使用了。整个消息只有XML。
xml主要由msg,item,source这3部分组成
<?xml version='1.0' encoding='utf-8' standalone='yes'?>| # -*- coding: utf-8 -*- | |
| import os | |
| os.environ["UNRAR_LIB_PATH"] = r"C:\Program Files (x86)\UnrarDLL\x64\UnRAR64.dll" | |
| import shutil | |
| from unrar import rarfile | |
| from pprint import pprint | |
| # 摸板抄你自己的 | |
| template = """ | |
| ### | |
| ### This file contains configuration information for Abaqus/CAE | |
| ### language settings. | |
| ### | |
| #################################################################### | |
| # This section describes what language and what encoding Abaqus/CAE | |
| # should use for a given system locale name. |
| import re | |
| from matplotlib import pyplot as plt | |
| from PIL import Image,ImageColor, ImageDraw, ImageFont | |
| import numpy as np | |
| import zhconv | |
| text = """A140 , 、 。 . ‧ ; : ? ! ︰ … ‥ ﹐ ﹑ ﹒ | |
| A150 · ﹔ ﹕ ﹖ ﹗ | – ︱ — ︳ ╴ ︴ ﹏ ( ) ︵ | |
| A160 ︶ { } ︷ ︸ 〔 〕 ︹ ︺ 【 】 ︻ ︼ 《 》 ︽ |
| """ | |
| Copyright (c) 2008-2023 synodriver <[email protected]> | |
| """ | |
| import asyncio | |
| import os | |
| import pty | |
| import sys | |
| async def read_stdout(proc): |
| """ | |
| Copyright (c) 2008-2023 synodriver <[email protected]> | |
| """ | |
| import asyncio | |
| import os | |
| import sys | |
| import threading | |
| import time | |
| from threading import Thread | |
| from typing import Dict, Tuple |
| # | |
| # This is a valgrind suppression file that should be used when using valgrind. | |
| # | |
| # Here's an example of running valgrind: | |
| # | |
| # cd python/dist/src | |
| # valgrind --tool=memcheck --suppressions=Misc/valgrind-python.supp \ | |
| # ./python -E ./Lib/test/regrtest.py -u gui,network | |
| # | |
| # You must edit Objects/obmalloc.c and uncomment Py_USING_MEMORY_DEBUGGER |
| import argparse | |
| import hashlib | |
| import os | |
| import sys | |
| from concurrent.futures import ThreadPoolExecutor | |
| from typing import IO | |
| def hash_filename(filename: str, chunk_size=2 * 10 * 6) -> str: | |
| md = hashlib.md5() | |
| with open(filename, "rb") as f: |
| # -*- coding: utf-8 -*- | |
| import os | |
| if os.name == "nt": | |
| import ctypes | |
| from ctypes import wintypes | |
| import msvcrt | |
| INVALID_HANDLE_VALUE = -1 |
| """ | |
| Copyright (c) 2008-2022 synodriver <[email protected]> | |
| """ | |
| import asyncio | |
| from enum import IntEnum | |
| from typing import List, Literal, Optional | |
| class NotAvailable(Exception): | |
| pass |