mirror of
https://github.com/Jerryplusy/rc-plugin.git
synced 2025-10-14 16:19:18 +00:00
🐞fix: 修复拉格朗日设置
This commit is contained in:
parent
897182ebcb
commit
a1acb6d6a6
@ -81,10 +81,10 @@ export class switchers extends plugin {
|
||||
*/
|
||||
async setLagrange(e) {
|
||||
// 查看当前设置
|
||||
let driver = (await redisExistAndGetKey(REDIS_YUNZAI_LAGRANGE))?.driver;
|
||||
let driver = (await redisGetKey(REDIS_YUNZAI_LAGRANGE))?.driver;
|
||||
// 如果是第一次
|
||||
if (driver === undefined) {
|
||||
await redisSetKey({
|
||||
await redisSetKey(REDIS_YUNZAI_LAGRANGE, {
|
||||
driver: 1,
|
||||
})
|
||||
driver = 1;
|
||||
@ -95,7 +95,7 @@ export class switchers extends plugin {
|
||||
}
|
||||
// 设置
|
||||
driver ^= 1;
|
||||
await redisSetKey({
|
||||
await redisSetKey(REDIS_YUNZAI_LAGRANGE, {
|
||||
driver: driver,
|
||||
})
|
||||
e.reply(`当前驱动:${ driver ? '拉格朗日' : '其他驱动' }`)
|
||||
|
Loading…
x
Reference in New Issue
Block a user