diff options
author | Kyomotoi <[email protected]> | 2020-04-28 20:37:45 +0800 |
---|---|---|
committer | Kyomotoi <[email protected]> | 2020-04-28 20:37:45 +0800 |
commit | ad97a84075904e36acce2644166e00be53b3e120 (patch) | |
tree | c0ad04e225029b6cea23632d56dc45f37b84e517 | |
parent | b33aba098aae9feafd77b56746b4ff5946c843cf (diff) | |
download | ATRI-ad97a84075904e36acce2644166e00be53b3e120.tar.gz ATRI-ad97a84075904e36acce2644166e00be53b3e120.tar.bz2 ATRI-ad97a84075904e36acce2644166e00be53b3e120.zip |
增加了一些琐碎的小配件
-rw-r--r-- | .idea/Aya.iml | 11 | ||||
-rw-r--r-- | .idea/misc.xml | 7 | ||||
-rw-r--r-- | .idea/modules.xml | 8 | ||||
-rw-r--r-- | .idea/vcs.xml | 6 | ||||
-rw-r--r-- | .idea/workspace.xml | 219 | ||||
-rw-r--r-- | AyaBot/plugins/__pycache__/awsl.cpython-37.pyc | bin | 735 -> 1029 bytes | |||
-rw-r--r-- | AyaBot/plugins/__pycache__/bilibilifan.cpython-37.pyc | bin | 803 -> 1083 bytes | |||
-rw-r--r-- | AyaBot/plugins/awsl.py | 11 | ||||
-rw-r--r-- | AyaBot/plugins/bilibili/__init__.py | 0 | ||||
-rw-r--r-- | AyaBot/plugins/bilibili/__pycache__/__init__.cpython-37.pyc | bin | 0 -> 134 bytes | |||
-rw-r--r-- | AyaBot/plugins/bilibili/index.py | 3 | ||||
-rw-r--r-- | AyaBot/plugins/bilibilifan.py | 29 | ||||
-rw-r--r-- | date.py | 8 |
13 files changed, 270 insertions, 32 deletions
diff --git a/.idea/Aya.iml b/.idea/Aya.iml new file mode 100644 index 0000000..6711606 --- /dev/null +++ b/.idea/Aya.iml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<module type="PYTHON_MODULE" version="4"> + <component name="NewModuleRootManager"> + <content url="file://$MODULE_DIR$" /> + <orderEntry type="inheritedJdk" /> + <orderEntry type="sourceFolder" forTests="false" /> + </component> + <component name="TestRunnerService"> + <option name="PROJECT_TEST_RUNNER" value="Unittests" /> + </component> +</module>
\ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..8656114 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="JavaScriptSettings"> + <option name="languageLevel" value="ES6" /> + </component> + <component name="ProjectRootManager" version="2" project-jdk-name="Python 3.7" project-jdk-type="Python SDK" /> +</project>
\ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..eca873e --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="ProjectModuleManager"> + <modules> + <module fileurl="file://$PROJECT_DIR$/.idea/Aya.iml" filepath="$PROJECT_DIR$/.idea/Aya.iml" /> + </modules> + </component> +</project>
\ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="VcsDirectoryMappings"> + <mapping directory="$PROJECT_DIR$" vcs="Git" /> + </component> +</project>
\ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000..f7341f9 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,219 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="ChangeListManager"> + <list default="true" id="36ba256b-4321-4561-a616-aba14c57931e" name="Default Changelist" comment=""> + <change beforePath="$PROJECT_DIR$/AyaBot/plugins/bilibilifan.py" beforeDir="false" afterPath="$PROJECT_DIR$/AyaBot/plugins/bilibilifan.py" afterDir="false" /> + </list> + <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> + <option name="SHOW_DIALOG" value="false" /> + <option name="HIGHLIGHT_CONFLICTS" value="true" /> + <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" /> + <option name="LAST_RESOLUTION" value="IGNORE" /> + </component> + <component name="FileEditorManager"> + <leaf> + <file pinned="false" current-in-tab="true"> + <entry file="file://$PROJECT_DIR$/AyaBot/plugins/bilibilifan.py"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="270"> + <caret line="21" column="34" lean-forward="true" selection-start-line="21" selection-start-column="34" selection-end-line="21" selection-end-column="34" /> + <folding> + <element signature="e#0#15#0" expanded="true" /> + </folding> + </state> + </provider> + </entry> + </file> + <file pinned="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/run.py"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="228"> + <caret line="12" selection-start-line="12" selection-end-line="12" /> + <folding> + <element signature="e#0#14#0" expanded="true" /> + </folding> + </state> + </provider> + </entry> + </file> + </leaf> + </component> + <component name="Git.Settings"> + <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" /> + </component> + <component name="IdeDocumentHistory"> + <option name="CHANGED_PATHS"> + <list> + <option value="$PROJECT_DIR$/run.py" /> + <option value="$PROJECT_DIR$/AyaBot/plugins/bilibilifan.py" /> + </list> + </option> + </component> + <component name="ProjectConfigurationFiles"> + <option name="files"> + <list> + <option value="$PROJECT_DIR$/.idea/Aya.iml" /> + <option value="$PROJECT_DIR$/.idea/misc.xml" /> + <option value="$PROJECT_DIR$/.idea/vcs.xml" /> + <option value="$PROJECT_DIR$/.idea/modules.xml" /> + </list> + </option> + </component> + <component name="ProjectFrameBounds"> + <option name="x" value="260" /> + <option name="y" value="20" /> + <option name="width" value="1400" /> + <option name="height" value="1000" /> + </component> + <component name="ProjectView"> + <navigator proportions="" version="1"> + <foldersAlwaysOnTop value="true" /> + </navigator> + <panes> + <pane id="Scope" /> + <pane id="ProjectPane"> + <subPane> + <expand> + <path> + <item name="Aya" type="b2602c69:ProjectViewProjectNode" /> + <item name="Aya" type="462c0819:PsiDirectoryNode" /> + </path> + <path> + <item name="Aya" type="b2602c69:ProjectViewProjectNode" /> + <item name="Aya" type="462c0819:PsiDirectoryNode" /> + <item name="AyaBot" type="462c0819:PsiDirectoryNode" /> + </path> + <path> + <item name="Aya" type="b2602c69:ProjectViewProjectNode" /> + <item name="Aya" type="462c0819:PsiDirectoryNode" /> + <item name="AyaBot" type="462c0819:PsiDirectoryNode" /> + <item name="plugins" type="462c0819:PsiDirectoryNode" /> + </path> + </expand> + <select /> + </subPane> + </pane> + </panes> + </component> + <component name="PropertiesComponent"> + <property name="WebServerToolWindowFactoryState" value="false" /> + <property name="last_opened_file_path" value="$PROJECT_DIR$" /> + </component> + <component name="RecentsManager"> + <key name="CopyFile.RECENT_KEYS"> + <recent name="D:\code\Aya" /> + </key> + </component> + <component name="RunDashboard"> + <option name="ruleStates"> + <list> + <RuleState> + <option name="name" value="ConfigurationTypeDashboardGroupingRule" /> + </RuleState> + <RuleState> + <option name="name" value="StatusDashboardGroupingRule" /> + </RuleState> + </list> + </option> + </component> + <component name="RunManager"> + <configuration name="run" type="PythonConfigurationType" factoryName="Python" temporary="true"> + <module name="Aya" /> + <option name="INTERPRETER_OPTIONS" value="" /> + <option name="PARENT_ENVS" value="true" /> + <envs> + <env name="PYTHONUNBUFFERED" value="1" /> + </envs> + <option name="SDK_HOME" value="" /> + <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" /> + <option name="IS_MODULE_SDK" value="true" /> + <option name="ADD_CONTENT_ROOTS" value="true" /> + <option name="ADD_SOURCE_ROOTS" value="true" /> + <EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" /> + <option name="SCRIPT_NAME" value="$PROJECT_DIR$/run.py" /> + <option name="PARAMETERS" value="" /> + <option name="SHOW_COMMAND_LINE" value="false" /> + <option name="EMULATE_TERMINAL" value="false" /> + <option name="MODULE_MODE" value="false" /> + <option name="REDIRECT_INPUT" value="false" /> + <option name="INPUT_FILE" value="" /> + <method v="2" /> + </configuration> + <recent_temporary> + <list> + <item itemvalue="Python.run" /> + </list> + </recent_temporary> + </component> + <component name="SvnConfiguration"> + <configuration /> + </component> + <component name="TaskManager"> + <task active="true" id="Default" summary="Default task"> + <changelist id="36ba256b-4321-4561-a616-aba14c57931e" name="Default Changelist" comment="" /> + <created>1588051377355</created> + <option name="number" value="Default" /> + <option name="presentableId" value="Default" /> + <updated>1588051377355</updated> + <workItem from="1588051381944" duration="1217000" /> + </task> + <servers /> + </component> + <component name="TimeTrackingManager"> + <option name="totallyTimeSpent" value="1217000" /> + </component> + <component name="ToolWindowManager"> + <frame x="260" y="20" width="1400" height="1000" extended-state="0" /> + <layout> + <window_info id="Favorites" side_tool="true" /> + <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.25" /> + <window_info id="Structure" order="1" side_tool="true" weight="0.25" /> + <window_info anchor="bottom" id="Docker" show_stripe_button="false" /> + <window_info anchor="bottom" id="Database Changes" /> + <window_info anchor="bottom" id="Version Control" /> + <window_info active="true" anchor="bottom" id="Python Console" visible="true" weight="0.3290993" /> + <window_info anchor="bottom" id="Terminal" /> + <window_info anchor="bottom" id="Event Log" side_tool="true" /> + <window_info anchor="bottom" id="Message" order="0" /> + <window_info anchor="bottom" id="Find" order="1" /> + <window_info anchor="bottom" id="Run" order="2" weight="0.3290993" /> + <window_info anchor="bottom" id="Debug" order="3" weight="0.4" /> + <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" /> + <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" /> + <window_info anchor="bottom" id="TODO" order="6" /> + <window_info anchor="right" id="SciView" /> + <window_info anchor="right" id="Database" /> + <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" /> + <window_info anchor="right" id="Ant Build" order="1" weight="0.25" /> + <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" /> + </layout> + </component> + <component name="TypeScriptGeneratedFilesManager"> + <option name="version" value="1" /> + </component> + <component name="com.intellij.coverage.CoverageDataManagerImpl"> + <SUITE FILE_PATH="coverage/Aya$run.coverage" NAME="run Coverage Results" MODIFIED="1588052657410" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" /> + </component> + <component name="editorHistoryManager"> + <entry file="file://$PROJECT_DIR$/run.py"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="228"> + <caret line="12" selection-start-line="12" selection-end-line="12" /> + <folding> + <element signature="e#0#14#0" expanded="true" /> + </folding> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/AyaBot/plugins/bilibilifan.py"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="270"> + <caret line="21" column="34" lean-forward="true" selection-start-line="21" selection-start-column="34" selection-end-line="21" selection-end-column="34" /> + <folding> + <element signature="e#0#15#0" expanded="true" /> + </folding> + </state> + </provider> + </entry> + </component> +</project>
\ No newline at end of file diff --git a/AyaBot/plugins/__pycache__/awsl.cpython-37.pyc b/AyaBot/plugins/__pycache__/awsl.cpython-37.pyc Binary files differindex 46a8162..c06634f 100644 --- a/AyaBot/plugins/__pycache__/awsl.cpython-37.pyc +++ b/AyaBot/plugins/__pycache__/awsl.cpython-37.pyc diff --git a/AyaBot/plugins/__pycache__/bilibilifan.cpython-37.pyc b/AyaBot/plugins/__pycache__/bilibilifan.cpython-37.pyc Binary files differindex a0b53ed..e6f89bd 100644 --- a/AyaBot/plugins/__pycache__/bilibilifan.cpython-37.pyc +++ b/AyaBot/plugins/__pycache__/bilibilifan.cpython-37.pyc diff --git a/AyaBot/plugins/awsl.py b/AyaBot/plugins/awsl.py index c476d59..2916d8c 100644 --- a/AyaBot/plugins/awsl.py +++ b/AyaBot/plugins/awsl.py @@ -1,14 +1,19 @@ +import random from nonebot import on_command, CommandSession -@on_command('阿这') +@on_command('阿这', only_to_me=False) async def _(session: CommandSession): await session.send('阿这') -@on_command('喵', aliases=['喵喵', '喵喵喵']) +@on_command('喵', aliases=['喵喵', '喵喵喵'], only_to_me=False) async def _(session: CommandSession): await session.send('喵~') -@on_command('奶宝', aliases=['@๑ ^ ₃•๑', '奶够翘']) +@on_command('奶宝', aliases=['@๑ ^ ₃•๑', '奶够翘'], only_to_me=False) async def _(session: CommandSession): await session.send('别叫了别叫了,8在') + +@on_command('抽签', only_to_me=False) +async def _(session: CommandSession): + await session.send(str(random.choice(['大凶', '小凶', '凶', '吉', '小吉', '中吉', '大吉'])))
\ No newline at end of file diff --git a/AyaBot/plugins/bilibili/__init__.py b/AyaBot/plugins/bilibili/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/AyaBot/plugins/bilibili/__init__.py diff --git a/AyaBot/plugins/bilibili/__pycache__/__init__.cpython-37.pyc b/AyaBot/plugins/bilibili/__pycache__/__init__.cpython-37.pyc Binary files differnew file mode 100644 index 0000000..a197886 --- /dev/null +++ b/AyaBot/plugins/bilibili/__pycache__/__init__.cpython-37.pyc diff --git a/AyaBot/plugins/bilibili/index.py b/AyaBot/plugins/bilibili/index.py new file mode 100644 index 0000000..c887183 --- /dev/null +++ b/AyaBot/plugins/bilibili/index.py @@ -0,0 +1,3 @@ +import requests +import nonebot +import json diff --git a/AyaBot/plugins/bilibilifan.py b/AyaBot/plugins/bilibilifan.py deleted file mode 100644 index 91a0bd4..0000000 --- a/AyaBot/plugins/bilibilifan.py +++ /dev/null @@ -1,29 +0,0 @@ -import requests -import json -from nonebot import on_command, CommandSession - - -@on_command('番剧索引') -async def _(session: CommandSession): - # url = 'https://api.bilibili.com/pgc/season/index/result?season_version=-1&area=-1&is_finish=-1©right=-1&season_status=-1&season_month=-1&year=-1&style_id=-1&order=3&st=1&sort=0&page=1&season_type=1&pagesize=20&type=1' - - res = requests.get( - 'https://api.bilibili.com/pgc/season/index/result?season_version=-1&area=-1&is_finish=-1©right=-1&season_status=-1&season_month=-1&year=-1&style_id=-1&order=3&st=1&sort=0&page=1&season_type=1&pagesize=20&type=1', - headers={ - 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36' - } - ) - - data = res.json() - print(['list']) - # JSON.data.list = data['JSON.data.list'] - # reply = '' - # for JSON.data.list in JSON.data.list: - # title = data.list['title'] - # url = data.list['link'] - # reply += f'\n{title}\n{url}' - # session.send('今日番剧索引如下: \n' + reply) - - # if not list: - # await session.send('暂时无法返回请求,或服务器变奇怪了...') - # return
\ No newline at end of file @@ -0,0 +1,8 @@ +import time +from datetime import datetime +import pytz + + + + +print(thisyear()) |