Rename package to "nonebot"

This commit is contained in:
Richard Chien
2018-12-27 20:23:45 +08:00
parent b8cb8e440b
commit 663797219a
71 changed files with 221 additions and 220 deletions

View File

@ -1,22 +1,22 @@
from os import path
import none
import nonebot
from demo import config
none.init(config)
nonebot.init(config)
@none.scheduler.scheduled_job('interval', seconds=20)
@nonebot.scheduler.scheduled_job('interval', seconds=20)
async def cb():
bot_ = none.get_bot()
bot_ = nonebot.get_bot()
try:
await bot_.send_private_msg(user_id=1002647525, message='')
except Exception as e:
none.logger.exception(e)
nonebot.logger.exception(e)
if __name__ == '__main__':
none.load_builtin_plugins()
none.load_plugins(path.join(path.dirname(__file__), 'plugins'),
'demo.plugins')
none.run(host=config.HOST, port=config.PORT)
nonebot.load_builtin_plugins()
nonebot.load_plugins(path.join(path.dirname(__file__), 'plugins'),
'demo.plugins')
nonebot.run(host=config.HOST, port=config.PORT)

View File

@ -1,6 +1,6 @@
import re
from none.default_config import *
from nonebot.default_config import *
HOST = '0.0.0.0'
SECRET = 'abc'

View File

@ -1,7 +1,7 @@
from aiocqhttp import Error as CQHttpError
from none import on_notice, NoticeSession, on_request, RequestSession
from none.helpers import render_expression as __
from nonebot import on_notice, NoticeSession, on_request, RequestSession
from nonebot.helpers import render_expression as __
GROUP_GREETING = (
'欢迎新同学 {name}[][CQ:face,id=63][CQ:face,id=63][CQ:face,id=63]',

View File

@ -1,4 +1,4 @@
from none import on_natural_language, NLPSession, NLPResult
from nonebot import on_natural_language, NLPSession, NLPResult
_last_session = None

View File

@ -1,4 +1,4 @@
from none import (
from nonebot import (
on_command, CommandSession,
on_natural_language, NLPSession, NLPResult
)

View File

@ -1,8 +1,8 @@
from none import (
from nonebot import (
CommandSession, CommandGroup,
on_natural_language, NLPSession, NLPResult
)
from none.helpers import render_expression as __
from nonebot.helpers import render_expression as __
from . import expressions as e