示例#1
0
from collections import defaultdict

from kokkoro.util import concat_pic, FreqLimiter
from kokkoro.service import Service
from kokkoro.msg_handler import EventInterface
from kokkoro import R, priv
import kokkoro

from .. import chara

sv = Service('pcr-arena', manage_priv=priv.SUPERUSER, enable_on_default=False)

from ..chara import Chara
from . import arena

lmt = FreqLimiter(5)

aliases = ('怎么拆', '怎么解', '怎么打', '如何拆', '如何解', '如何打', '怎麼拆', '怎麼解', '怎麼打',
           'jjc查询', 'jjc查詢')
aliases_b = tuple('b' + a for a in aliases) + tuple('B' + a for a in aliases)
aliases_tw = tuple('台' + a for a in aliases)
aliases_jp = tuple('日' + a for a in aliases)


@sv.on_prefix(aliases)
async def arena_query(bot, ev):
    await _arena_query(bot, ev, region=1)


@sv.on_prefix(aliases_b)
async def arena_query_b(bot, ev):
示例#2
0
import matplotlib.pyplot as plt
from .data_source import add_text, get_data, get_person
import base64
import pandas as pd
import numpy as np
import datetime

from kokkoro.common_interface import KokkoroBot, EventInterface
from kokkoro.service import Service
from kokkoro.util import FreqLimiter
from kokkoro import R

from .. import sv, cb_cmd

_time_limit = 30*60
_lmt = FreqLimiter(_time_limit)

b_constellations = ["摩羯","水瓶","双鱼","白羊","金牛","双子","巨蟹","狮子","处女","天秤","天蝎","射手"] #国服的(预测)

background1 = R.img('priconne/公会离职报告模板.jpg')
background2 = R.img('priconne/公会本期报告模板.jpg')

REPORT_RESIGN = 0
REPORT_NORMAL = 1
REPORT_UNDECLARED = -1

sv = Service('clanbattle-report')

@sv.on_fullmatch(('离职报告', 'retire-report'))
async def send_resign_report(bot:KokkoroBot, event:EventInterface):
    await send_report(bot, event, type=REPORT_RESIGN)