Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/Cassius0924/WeChatter
/ functions
Functions
430 in github.com/Cassius0924/WeChatter
⨍
Functions
430
◇
Types & classes
78
↳
Endpoints
26
↓ 25 callers
Function
get_abs_path
获取绝对路径 :param relative_path: 文件相对于项目目录的相对路径 :return: 文件的绝对路径
wechatter/utils/path_manager.py:4
↓ 20 callers
Method
_send_msg
发送给游戏房间消息 :param message: 消息内容 :param type: 消息类型
wechatter/games/game.py:282
↓ 13 callers
Method
join
加入游戏
wechatter/games/game.py:322
↓ 12 callers
Method
add
(self, element: T)
wechatter/utils/unique_list.py:17
↓ 12 callers
Function
get_request
发送GET请求,并返回Response对象 :param url: 请求的URL :param params: 请求参数(默认为None) :param headers: 请求头(默认为带有User-Agent的请求头) :param timeout: 超时
wechatter/utils/http_request.py:11
↓ 11 callers
Function
join_path
拼接路径 :param *args: 路径(可变参数) :return: 拼接后的路径
wechatter/utils/path_manager.py:15
↓ 7 callers
Method
from_model
(cls, group_model: GroupModel)
wechatter/database/tables/group.py:38
↓ 7 callers
Method
update
(self, group_model: GroupModel)
wechatter/database/tables/group.py:56
↓ 6 callers
Function
get_request_json
发送GET请求,并解析返回的JSON :param url: 请求的URL :param params: 请求参数(默认为None) :param headers: 请求头(默认为带有User-Agent的请求头) :param timeout: 超时时间(
wechatter/utils/http_request.py:49
↓ 5 callers
Function
_execute_game
执行游戏命令 :param cmd: 游戏命令(create、start、join、play、over) :param to: 发送对象 :param message: 消息内容 :param message_obj: 消息对象 :param gam
wechatter/games/__init__.py:47
↓ 5 callers
Function
_post_request
( url, data=None, json=None, files=None, headers={}, timeout=5 )
wechatter/sender/sender.py:93
↓ 5 callers
Function
_send_localfile_msg1
发送本地文件 :param name: 接收者 :param file_path: 文件路径 :param is_group: 是否为群组
wechatter/sender/sender.py:350
↓ 5 callers
Function
join_urls
拼接 URL :param base_url: 基础 URL :param relative_url: 相对 URL
wechatter/utils/url_joiner.py:6
↓ 5 callers
Method
to_model
(self)
wechatter/database/tables/group.py:45
↓ 5 callers
Function
url_encode
对字符串进行url编码 :param s: 待编码字符串 :param safe: 保留字符 :param plus: 是否用"+"替换空格 :return: 编码后的字符串
wechatter/utils/url_codec.py:4
↓ 4 callers
Method
_is_chat_valid
判断对话是否有效
wechatter/commands/_commands/openai_chat_gpt.py:509
↓ 4 callers
Method
get_chatting_chat_info
获取正在进行中的对话信息 :param person: 用户 :param model: 模型 :return: 对话信息
wechatter/commands/_commands/openai_chat_gpt.py:384
↓ 4 callers
Function
make_quotable
将消息可引用化 :param message: 消息内容 :param quoted_response: 可引用的消息内容 :return: 可引用的消息内容
wechatter/sender/quotable.py:11
↓ 4 callers
Function
mass_send_msg
群发消息,给多个人发送一条消息 :param name_list: 接收者列表 :param message: 消息内容 :param is_group: 是否为群组 :param type: 消息类型(text、fileUrl、localfile)
wechatter/sender/sender.py:301
↓ 4 callers
Method
over_game
(self, message: str, game_states: GameStates)
wechatter/games/game.py:243
↓ 4 callers
Method
to_dict
转换为字典
wechatter/games/game.py:268
↓ 3 callers
Function
_load_todos
加载特定用户的待办事项
wechatter/commands/_commands/todo.py:64
↓ 3 callers
Function
_send_msg1
发送消息 :param name: 接收者 :param message: 消息内容 :param is_group: 是否为群组(默认为个人,False) :param type: 消息类型(text、fileUrl) :param quoted_
wechatter/sender/sender.py:166
↓ 3 callers
Function
_send_msg_list1
发送多条消息,消息类型相同 :param name: 接收者 :param message_list: 消息内容列表 :param is_group: 是否为群组 :param type: 消息类型(text、fileUrl)
wechatter/sender/sender.py:259
↓ 3 callers
Function
check_and_create_folder
检查文件是否存在,如果不存在则创建 :param paths: 文件夹路径(可变参数)
wechatter/utils/file_manager.py:9
↓ 3 callers
Function
func
( _cmd: str, _to_person_list: List, _to_group_list: List,
wechatter/config/parsers/task_cron_list_parser.py:89
↓ 3 callers
Function
load_json
(file_path)
wechatter/utils/json_manager.py:22
↓ 3 callers
Function
view_todos
查看特定用户的所有待办事项
wechatter/commands/_commands/todo.py:106
↓ 2 callers
Method
__draw_board
绘制棋盘
wechatter/games/_games/tictactoe.py:153
↓ 2 callers
Method
_chat
持续对话 :param chat_info: 对话信息 :param message: 用户消息 :param message_obj: 消息对象 :param is_save: 是否保存此轮对话记录
wechatter/commands/_commands/openai_chat_gpt.py:416
↓ 2 callers
Function
_check_headers
(headers: Dict)
wechatter/utils/http_request.py:132
↓ 2 callers
Function
_check_lang_support
(from_lang: str, to_lang: str)
wechatter/commands/_commands/translate.py:174
↓ 2 callers
Function
_construct_forwarding_message
构造转发消息
wechatter/message/message_forwarder.py:230
↓ 2 callers
Function
_execute_command
执行命令 :param cmd_dict: 命令字典 :param to: 发送对象 :param message_obj: 消息对象
wechatter/message/message_handler.py:199
↓ 2 callers
Function
_forwarding_by_rule
根据规则转发消息 :param message_obj: 消息对象 :param rule: 规则
wechatter/message/message_forwarder.py:18
↓ 2 callers
Function
_gptx
(model: str, to: SendTo, message: str = "", message_obj=None)
wechatter/commands/_commands/openai_chat_gpt.py:119
↓ 2 callers
Function
_gptx_chats
(model: str, to: SendTo, message: str = "", message_obj=None)
wechatter/commands/_commands/openai_chat_gpt.py:152
↓ 2 callers
Function
_gptx_continue
(model: str, to: SendTo, message: str = "")
wechatter/commands/_commands/openai_chat_gpt.py:174
↓ 2 callers
Function
_gptx_record
(model: str, to: SendTo, message: str = "")
wechatter/commands/_commands/openai_chat_gpt.py:157
↓ 2 callers
Method
_list_chat_info
列出用户的所有对话记录
wechatter/commands/_commands/openai_chat_gpt.py:322
↓ 2 callers
Method
_save_chatting_chat_topic
生成正在进行的对话的主题
wechatter/commands/_commands/openai_chat_gpt.py:462
↓ 2 callers
Function
_save_todos
保存待办事项到特定用户的 JSON 文件中
wechatter/commands/_commands/todo.py:72
↓ 2 callers
Function
_send_people_daily
(to: Union[str, SendTo], message: str, type: str)
wechatter/commands/_commands/people_daily.py:36
↓ 2 callers
Method
_set_all_chats_not_chatting
将所有对话记录的 is_chatting 字段设置为 False
wechatter/commands/_commands/openai_chat_gpt.py:311
↓ 2 callers
Method
create_chat
创建一个新的对话 :param person: 用户 :param model: 模型 :return: 新的对话信息
wechatter/commands/_commands/openai_chat_gpt.py:202
↓ 2 callers
Method
from_member_model
(cls, member_model: "GroupMember")
wechatter/database/tables/person.py:64
↓ 2 callers
Method
get_brief_conversation_str
获取对话记录的字符串 :param chat_info: 对话记录 :return: 对话记录字符串
wechatter/commands/_commands/openai_chat_gpt.py:279
↓ 2 callers
Method
get_chat_info
获取用户的对话信息 :param person: 用户 :param model: 模型 :param chat_index: 对话记录索引(从1开始) :return: 对话信息
wechatter/commands/_commands/openai_chat_gpt.py:366
↓ 2 callers
Function
get_people_daily_url
获取特定日期特定版本的人民日报PDF到本地并返回url
wechatter/commands/_commands/people_daily.py:58
↓ 2 callers
Function
init_logger
(log_level: str = "")
wechatter/init_logger.py:43
↓ 2 callers
Function
post_request
发送POST请求,并返回Response对象 :param url: 请求的URL :param data: 请求体(默认为None) :param json: 请求体(默认为None) :param files: 文件(默认为None) :para
wechatter/utils/http_request.py:66
↓ 2 callers
Method
start
开始游戏
wechatter/games/game.py:315
↓ 1 callers
Method
__init__
(self, iterable: Iterable[T] = ())
wechatter/utils/unique_list.py:12
↓ 1 callers
Method
__judge_winner
判断胜利
wechatter/games/_games/tictactoe.py:131
↓ 1 callers
Method
__parse_command
解析命令 :param content: 消息内容 :param is_mentioned: 是否@机器人 :param is_group: 是否群消息
wechatter/message/message_handler.py:160
↓ 1 callers
Function
_auto_translate
(from_lang: str, to_lang: str)
wechatter/commands/_commands/translate.py:140
↓ 1 callers
Function
_check_model_by_lang
(lang: str)
wechatter/commands/_commands/translate.py:167
↓ 1 callers
Function
_construct_official_account_reminder_image
构造公众号文章提醒图片
wechatter/message/message_forwarder.py:220
↓ 1 callers
Function
_construct_official_account_reminder_message
构造公众号文章提醒消息
wechatter/message/message_forwarder.py:208
↓ 1 callers
Method
_delete_chat
删除对话记录
wechatter/commands/_commands/openai_chat_gpt.py:269
↓ 1 callers
Function
_detect_lang
(content: str)
wechatter/commands/_commands/translate.py:182
↓ 1 callers
Function
_execute_quoted_handler
执行可引用的命令消息处理函数 :param quoted_handler: 可引用的命令消息处理函数 :param to: 发送对象 :param message_obj: 消息内容 :param quoted_response: 可引用的命令消息
wechatter/message/message_handler.py:224
↓ 1 callers
Function
_extract_bili_hot_data
(r_json: Dict)
wechatter/commands/_commands/bili_hot.py:68
↓ 1 callers
Function
_extract_douyin_hot_data
(r_json: Dict)
wechatter/commands/_commands/douyin_hot.py:67
↓ 1 callers
Function
_extract_today_in_history_data
(r_json: Dict)
wechatter/commands/_commands/today_in_history.py:35
↓ 1 callers
Function
_extract_transliteration_data
(r_json: Dict)
wechatter/commands/_commands/translate.py:116
↓ 1 callers
Function
_extract_weibo_hot_data
(r_json: Dict)
wechatter/commands/_commands/weibo_hot.py:67
↓ 1 callers
Function
_extract_zhihu_hot_data
(r_json: Dict)
wechatter/commands/_commands/zhihu_hot.py:65
↓ 1 callers
Function
_generate_bili_hot_message
(hot_list: List)
wechatter/commands/_commands/bili_hot.py:77
↓ 1 callers
Function
_generate_bili_hot_quoted_response
(hot_list: List)
wechatter/commands/_commands/bili_hot.py:89
↓ 1 callers
Method
_generate_chat_topic
生成对话主题,用于保存对话记录
wechatter/commands/_commands/openai_chat_gpt.py:485
↓ 1 callers
Function
_generate_douyin_hot_message
(hot_list: List)
wechatter/commands/_commands/douyin_hot.py:76
↓ 1 callers
Function
_generate_douyin_hot_quoted_response
(hot_list: List)
wechatter/commands/_commands/douyin_hot.py:87
↓ 1 callers
Function
_generate_food_message
生成食物信息 :param food_detail_list: 食物详情列表 :return: 食物信息
wechatter/commands/_commands/food_calories.py:71
↓ 1 callers
Function
_generate_gasoline_price_message
(gasoline_price: str, message: str)
wechatter/commands/_commands/gasoline_price.py:97
↓ 1 callers
Function
_generate_github_trending_message
(gt_list: List)
wechatter/commands/_commands/github_trending.py:124
↓ 1 callers
Function
_generate_github_trending_quoted_response
(gt_list: List)
wechatter/commands/_commands/github_trending.py:140
↓ 1 callers
Function
_generate_pai_post_message
(pai_post_list: List)
wechatter/commands/_commands/pai_post.py:97
↓ 1 callers
Function
_generate_pai_post_quoted_response
(pai_post_list: List)
wechatter/commands/_commands/pai_post.py:108
↓ 1 callers
Function
_generate_qrcode
生成二维码,返回二维码图像
wechatter/commands/_commands/qrcode.py:48
↓ 1 callers
Function
_generate_today_in_history_message
(tih_list: List)
wechatter/commands/_commands/today_in_history.py:44
↓ 1 callers
Function
_generate_translate_message
( content: str, from_lang: str, to_lang: str, word_list: List, transliteration: str )
wechatter/commands/_commands/translate.py:125
↓ 1 callers
Function
_generate_trivia_message
(trivia_list: List, random_number)
wechatter/commands/_commands/trivia.py:63
↓ 1 callers
Function
_generate_weather_message
( c_data: Dict, hourly_data: Dict, future_weather_list: List, sun_time: Dict )
wechatter/commands/_commands/weather.py:234
↓ 1 callers
Function
_generate_weibo_hot_message
(hot_list: List)
wechatter/commands/_commands/weibo_hot.py:76
↓ 1 callers
Function
_generate_weibo_hot_quoted_response
(hot_list: List)
wechatter/commands/_commands/weibo_hot.py:87
↓ 1 callers
Function
_generate_zhihu_hot_message
(hot_list: List)
wechatter/commands/_commands/zhihu_hot.py:74
↓ 1 callers
Function
_generate_zhihu_hot_quoted_response
(hot_list: List)
wechatter/commands/_commands/zhihu_hot.py:85
↓ 1 callers
Function
_get_city_id
获取城市代码 :param city: 城市名 :return: 城市代码
wechatter/commands/_commands/weather.py:116
↓ 1 callers
Function
_get_city_id
获取城市代码 :param city_name: 城市名 :return: 城市代码
wechatter/commands/_commands/gasoline_price.py:83
↓ 1 callers
Function
_get_food_detail_list
获取食物详情列表 :param food_href_list: 食物详情链接列表 :return: 食物详情列表
wechatter/commands/_commands/food_calories.py:42
↓ 1 callers
Function
_get_future_weather
获取未来几小时的天气 :param h_data: 逐小时天气 :param now_ymdh: 当前年月日时 :param hours: 未来几小时 :return: 未来几小时的天气
wechatter/commands/_commands/weather.py:214
↓ 1 callers
Function
_get_quotable_id
获取可引用消息的ID :return: 可引用消息的ID
wechatter/sender/quotable.py:31
↓ 1 callers
Function
_get_quoted_response
获取可引用的命令消息 :param quotable_id: 可引用的命令消息id :return: 可引用的命令消息
wechatter/message/message_handler.py:245
↓ 1 callers
Function
_get_sun_time
(sunset: List, sunrise: List)
wechatter/commands/_commands/weather.py:182
↓ 1 callers
Function
_get_url_encoding
获取URL编码 :param message: 消息 :return: URL编码
wechatter/commands/_commands/food_calories.py:161
↓ 1 callers
Method
_has_topic
判断对话是否有主题
wechatter/commands/_commands/openai_chat_gpt.py:502
↓ 1 callers
Function
_increase_id
将ID加1,如果ID超过 ZZZ,则从 000 开始
wechatter/sender/quotable.py:50
↓ 1 callers
Function
_parse_c_weather
解析实时天气 :param c_weather: 实时天气 :return: 实时天气
wechatter/commands/_commands/weather.py:165
↓ 1 callers
Function
_parse_food_detail_response
解析食物详情 :param response: 请求响应 :param food_all_name: 食物全名 :return: 食物详情
wechatter/commands/_commands/food_calories.py:103
next →
1–100 of 430, ranked by callers