Commit 1d5d6f32 authored by nanahira's avatar nanahira

migrate to rc1

parent 867d8cf0
This diff is collapsed.
......@@ -28,10 +28,10 @@
},
"homepage": "https://code.mycard.moe/3rdeye/koishi-plugin-dicex",
"peerDependencies": {
"koishi": "^4.0.0-rc.0"
"koishi": "^4.0.0-rc.1"
},
"dependencies": {
"koishi-thirdeye": "^6.0.3",
"koishi-thirdeye": "^7.0.2",
"source-map-support": "^0.5.21"
},
"devDependencies": {
......@@ -41,7 +41,7 @@
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^3.4.1",
"koishi": "^4.0.0-rc.0",
"koishi": "^4.0.0-rc.1",
"prettier": "^2.5.1",
"raw-loader": "^4.0.2",
"ts-loader": "^9.2.6",
......
......@@ -10,9 +10,6 @@ import { CompatModule } from './modules/compat';
export * from './config';
declare module 'koishi' {
interface Modules {
dicex: typeof import('.');
}
// eslint-disable-next-line @typescript-eslint/no-namespace
namespace Context {
interface Services {
......
import { DiceModule } from '../utility/utility';
import { BaseModule } from '../utility/base-module';
import { UseMiddleware } from 'koishi-thirdeye';
import { NextFunction, Session } from 'koishi';
import { Next, Session } from 'koishi';
import { rcRegexp, rollRegexp } from '../utility/constant';
@DiceModule()
export class CompatModule extends BaseModule {
@UseMiddleware()
onRollCompat(session: Session, next: NextFunction) {
onRollCompat(session: Session, next: Next) {
const { content, prefix } = session.parsed;
if (!prefix || content[0] !== 'r') return next();
const expr = content.slice(1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment