npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-mirai-fgo-gacha

v0.0.9

Published

node-mirai-sdk fgo gacha plugin

Downloads

7

Readme

Node Mirai Fgo Gacha

node-mirai-sdk 的 FGO 模拟扭蛋插件

卡池内容、概率、资源素材等均来自 Mooncell,如有余力请多多支持 Mooncell

Usage

NodeMiraiSDK 的配置请参考 node-mirai-sdk

npm i -S node-mirai-fgo-gacha

index.js

// 初次调用时会自动初始化卡池,并下载相关资源,这可能需要一些时间
const FGOGacha = require('node-mirai-fgo-gacha');

const bot = new Mirai({/* ... */});

// 配置参数均为可选,以下列出的是默认参数值
bot.use(FGOGacha({
  cooldown: 60000,           // 扭蛋的冷却时间,单位 ms
  allowGroup: true,          // 群聊扭蛋开关
  allowPrivate: false,       // 私聊扭蛋开关
  recall: true,              // 在指定时间后撤回扭蛋图片以防刷屏
  recallDelay: 30000,        // 指定撤回延迟,时间 5000 - 60000
  prefix: ``,                // 指令前缀,可用于避免误触发
  groupWhitelistMode: false, // 群聊白名单模式开关
  groupBlacklist: [],        // 群聊黑名单
  groupWhitelist: [],        // 群聊白名单
  qqWhitelistMode: false,    // qq 白名单开关
  qqBlacklist: [],           // qq 黑名单
  qqWhitelist: [],           // qq 白名单
  superAdmin: [],            // 超级管理员 qq 名单
  hints: {                   // 一些可配置的提示
    gacha: `本次召唤结果`,
    listPools: `现在数据库里有这些卡池哦~`,
    invalidPoolId: `卡池编号不正确哦~`,
    setPoolSuccess: `设置卡池成功`,
    poolNotSet: `尚未设置卡池,无法进行召唤`,
    inCooldown: `召唤冷却中,每60秒可进行一次召唤`,
    permissionError: `权限不足`,
  },
}));

// 可选
// 更新卡池信息和资源
FGOGacha.update();
// 强制初始化
FGOGacha.init();

指令列表

在设置了prefix字段的情况下添加前缀才会触发指令

| 指令 | 功能 | | -------- | ---- | | 查询卡池 | 列出当前保存的卡池信息 | | 设置卡池 x | 选择指定编号的卡池 | | 十连召唤 | 召唤10次 | | 十一连召唤 | 召唤11次 | | 百连召唤 | 召唤100次(只展示4星及以上结果) | | 更新 | (权:superAdmin字段中的管理员) 更新卡池和资源 |

关于卡池

  • node-mirai-fgo-gacha 采用的是 这个页面 所展示的卡池(不含福袋)

  • node-mirai-fgo-gacha 会在初次使用时自动初始化卡池, 下载资源文件(总计10MB+), 这些文件保存在工作目录下的.fgo-gacha/文件夹内,此后必须通过超级管理员发送更新指令或 FGOGacha.update() 方法手动更新, 如果已有的资源出现错误, 可以通过 FGOGacha.init() 方法重新初始化

  • 随机和保底机制纯属猜测, 与官方不一定一致一定不一致, 因此结果没有参考价值, 仅供娱乐, 请勿当真