Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
K
koishi-plugin-tabulate
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
3rdeye
koishi-plugin-tabulate
Commits
10088f45
Commit
10088f45
authored
Dec 13, 2021
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use onApply for tricky reasons
parent
762cba22
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
12 deletions
+2
-12
src/index.ts
src/index.ts
+2
-12
No files found.
src/index.ts
View file @
10088f45
...
...
@@ -33,7 +33,7 @@ declare module 'koishi' {
}
@
KoishiPlugin
({
name
:
'
tabulate
'
,
schema
:
TabulatePluginConfig
})
export
default
class
TabulatePlugin
implements
OnApply
,
OnConnect
{
export
default
class
TabulatePlugin
implements
OnApply
{
constructor
(
private
ctx
:
Context
,
config
:
TabulatePluginConfigLike
)
{}
async
getGames
(
key
:
string
)
{
...
...
@@ -64,18 +64,8 @@ export default class TabulatePlugin implements OnApply, OnConnect {
@
Inject
(
'
cache
'
,
true
)
private
cache
:
Cache
;
onConnect
()
{
this
.
cache
.
table
(
'
tabulateMatches
'
,
{
maxAge
:
this
.
config
.
saveTime
});
}
onApply
()
{
// patch tabulate specific rules
/*
this.ctx
.command('tabulate')
.option('rule', '--kof 使用 KOF 赛制', { value: '2/3【KOF】' })
.option('rule', '--head 使用人头赛赛制', { value: '人头赛' });
*/
this
.
cache
.
table
(
'
tabulateMatches
'
,
{
maxAge
:
this
.
config
.
saveTime
});
}
@
UseCommand
(
'
tabulate
'
,
'
排表
'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment