koishi-plugin-dicey-dungeons
Advanced tools
Comparing version 1.1.7 to 1.1.8
@@ -85,7 +85,8 @@ "use strict"; | ||
ctx.middleware(async (session, next) => { | ||
const a = /^[0-9]$/?.test(session.content.split(' ')[0]); | ||
const b = /^[0-9]$/?.test(session.content.split(' ')[1]); | ||
const a = /^[1-9]$/?.test(session.content.split(' ')[0]); | ||
const b = /^[1-9]$/?.test(session.content.split(' ')[1]); | ||
const { userId, guildId, username, platform, content } = session; | ||
const read = await ctx.database.get('dice_group', { guildId }); | ||
if (a == true && b == true && read?.[0]?.Play_1_userId == userId || read?.[0]?.Play_2_userId == userId) { | ||
const play = read?.[0]?.Play_1_userId === userId ? true : read?.[0]?.Play_2_userId === userId ? true : false; //|| read?.[0]?.Play_2_userId === userId; | ||
if (a == true && b == true && read?.[0]?.game_status == 2 && play == true) { | ||
session.execute(`点数 ${content.split('-')[0]} ${session.content.split('-')[1]}`); | ||
@@ -92,0 +93,0 @@ } |
{ | ||
"name": "koishi-plugin-dicey-dungeons", | ||
"description": "中文名:骰子地下城 双人回合对战", | ||
"version": "1.1.7", | ||
"version": "1.1.8", | ||
"main": "lib/index.js", | ||
@@ -6,0 +6,0 @@ "typings": "lib/index.d.ts", |
36447
647