Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
K
koishi-plugin-pics
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-pics
Commits
2e0cb0b4
Commit
2e0cb0b4
authored
Mar 26, 2022
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add testing source
parent
b65905eb
Pipeline
#11161
passed with stages
in 56 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
2 deletions
+23
-2
dev/extras.ts
dev/extras.ts
+23
-2
No files found.
dev/extras.ts
View file @
2e0cb0b4
import
{
Context
}
from
'
koishi
'
;
import
{
Awaitable
,
Context
}
from
'
koishi
'
;
import
{
PicResult
,
PicSource
}
from
'
../src
'
;
class
TestPicsource
extends
PicSource
{
constructor
(
ctx
:
Context
,
public
name
:
string
)
{
super
(
ctx
);
}
isDefault
=
true
;
randomPic
(
picTags
:
string
[]):
Awaitable
<
PicResult
>
{
return
{
url
:
`https://cdn02.moecube.com:444/images/ygopro-images-
${
this
.
name
}
/
${
picTags
[
0
]
||
'
10000
'
}
.jpg`
,
description
:
picTags
[
0
]
||
'
10000
'
,
};
}
}
export
default
class
ExtrasInDev
{
export
default
class
ExtrasInDev
{
constructor
(
ctx
:
Context
)
{}
constructor
(
ctx
:
Context
)
{
ctx
.
pics
.
addSource
(
new
TestPicsource
(
ctx
,
'
zh-CN
'
));
ctx
.
pics
.
addSource
(
new
TestPicsource
(
ctx
,
'
en-US
'
));
}
static
using
=
[
'
pics
'
]
as
const
;
}
}
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