GithubHelp home page GithubHelp logo

nonebot_plugin_leetcode_everyday's Introduction

nonbot-plugin-leetcode-everyday

刚接触聊天机器人,做个玩玩。可以定时发送lc每日一题,也可以在qq里发送 /每日一题 获取

依赖

本插件使用onebot适配器,并且依赖官方插件 nonebot-plugin-apscheduler

如何使用

本插件暂未发布,如需使用,可以clone本仓库到本地使用。
另外由于本插件使用了无头浏览器进行渲染,内存消耗较大,请自行斟酌如何使用

配置

您可以在 .env 文件中配置如下参数:

lce_hour : int -> 订阅发送时间,以北京时间表示,默认为北京时间八点

lce_admin : dict[str , list] -> 管理员,可以识别usersgroups键,分别为管理员用户和管理员群,值为qq号/群号数组。例:lce_admin={"users":["123456789"]}

lce_subscriber : dict[str , list] -> 同上,但一般无需配置

lce_size : dict[str , int] -> 默认值为{"width":500,"height":300},表示无头浏览器视口大小,影响最终图片大小

在qq中使用

任一用户/群均可通过私聊/at发送 /每日一题/lce 获得当天的题目,或在订阅后等待机器人发送

管理员指令

本插件只能由管理员代为订阅/退订(主要是作者摆了)
向机器人发送 /管理/lcem 开启管理任务,然后可以发送以下指令:

更新update : 立刻更新一次每日一题缓存

结束finish : 结束管理任务

状态status : 查看插件运行状态,管理员和订阅情况等

大小size : 调整浏览器视口大小,间接影响图片大小,接受两个整型参数,第一个参数为宽,第二个参数为高,例:size 500 300

加订add : 增加订阅用户,后接以空格分隔的参数列,接受的第一个参数为usergroup 指明后续参数是qq号还是群号,后续可以跟任意长的参数,例:add user 123456789 987654321

退订remove : 移除订阅用户,参数同上,例:remove user 123456789 987654321

此外各指令还有一些别名,具体可以直接参考源码

感谢

感谢以下项目,在本插件制作过程中从其中吸收了许多经验
Nranphy/nonebot_plugin_leetcode
zxz0415/leetcode
kexue-z/nonebot-plugin-htmlrender

nonebot_plugin_leetcode_everyday's People

Contributors

mwbimh avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.