Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
K
koishi-plugin-greeting
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-greeting
Commits
a9ce85fb
Commit
a9ce85fb
authored
Sep 13, 2022
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bump
parent
3299d585
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
340 additions
and
721 deletions
+340
-721
dev/index.ts
dev/index.ts
+2
-1
package-lock.json
package-lock.json
+331
-713
package.json
package.json
+5
-5
src/config.ts
src/config.ts
+2
-2
No files found.
dev/index.ts
View file @
a9ce85fb
...
@@ -13,10 +13,11 @@ const app = new Context({
...
@@ -13,10 +13,11 @@ const app = new Context({
});
});
// Console and sandbox
// Console and sandbox
app
.
plugin
(
SandboxPlugin
);
//
app.plugin(SandboxPlugin);
app
.
plugin
(
ConsolePlugin
,
{
app
.
plugin
(
ConsolePlugin
,
{
open
:
false
,
open
:
false
,
});
});
app
.
plugin
(
SandboxPlugin
);
// Some services
// Some services
// app.plugin(CachePlugin);
// app.plugin(CachePlugin);
...
...
package-lock.json
View file @
a9ce85fb
This diff is collapsed.
Click to expand it.
package.json
View file @
a9ce85fb
...
@@ -28,15 +28,15 @@
...
@@ -28,15 +28,15 @@
},
},
"homepage"
:
"
https://code.mycard.moe/3rdeye/koishi-plugin-greeting
"
,
"homepage"
:
"
https://code.mycard.moe/3rdeye/koishi-plugin-greeting
"
,
"dependencies"
:
{
"dependencies"
:
{
"
koishi-thirdeye
"
:
"
^11.
0.12
"
,
"
koishi-thirdeye
"
:
"
^11.
1.0
"
,
"
lodash
"
:
"
^4.17.21
"
,
"
lodash
"
:
"
^4.17.21
"
,
"
moment
"
:
"
^2.29.1
"
,
"
moment
"
:
"
^2.29.1
"
,
"
node-schedule
"
:
"
^2.1.0
"
"
node-schedule
"
:
"
^2.1.0
"
},
},
"devDependencies"
:
{
"devDependencies"
:
{
"
@koishijs/plugin-console
"
:
"
^4.
1.1
"
,
"
@koishijs/plugin-console
"
:
"
^4.
5.4
"
,
"
@koishijs/plugin-database-memory
"
:
"
^1.
4.1
"
,
"
@koishijs/plugin-database-memory
"
:
"
^1.
5.0
"
,
"
@koishijs/plugin-sandbox
"
:
"
^2.
0.1
"
,
"
@koishijs/plugin-sandbox
"
:
"
^2.
2.9
"
,
"
@types/jest
"
:
"
^27.4.0
"
,
"
@types/jest
"
:
"
^27.4.0
"
,
"
@types/lodash
"
:
"
^4.14.178
"
,
"
@types/lodash
"
:
"
^4.14.178
"
,
"
@types/node
"
:
"
^17.0.8
"
,
"
@types/node
"
:
"
^17.0.8
"
,
...
@@ -59,7 +59,7 @@
...
@@ -59,7 +59,7 @@
"
ws
"
:
"
^8.4.2
"
"
ws
"
:
"
^8.4.2
"
},
},
"peerDependencies"
:
{
"peerDependencies"
:
{
"koishi"
:
"^4.
8.7
"
"koishi"
:
"^4.
9.1
"
},
},
"jest"
:
{
"jest"
:
{
"moduleFileExtensions"
:
[
"moduleFileExtensions"
:
[
...
...
src/config.ts
View file @
a9ce85fb
...
@@ -194,7 +194,7 @@ export class Instance {
...
@@ -194,7 +194,7 @@ export class Instance {
})
})
rules
:
Rule
[];
rules
:
Rule
[];
async
run
(
list
:
Bot
[])
{
async
run
(
list
:
Bot
[])
{
const
bot
=
this
.
getBot
(
list
);
const
bot
=
this
.
getBot
(
list
);
if
(
bot
?.
status
!==
'
online
'
)
{
if
(
bot
?.
status
!==
'
online
'
)
{
logger
.
info
(
`Skipping job for
${
this
.
from
}
because it's not online.`
);
logger
.
info
(
`Skipping job for
${
this
.
from
}
because it's not online.`
);
...
@@ -235,7 +235,7 @@ export class GreetingPluginConfig {
...
@@ -235,7 +235,7 @@ export class GreetingPluginConfig {
@
DefineSchema
({
description
:
'
实例列表。
'
,
type
:
Instance
})
@
DefineSchema
({
description
:
'
实例列表。
'
,
type
:
Instance
})
instances
:
Instance
[];
instances
:
Instance
[];
async
runInstances
(
list
:
Bot
[],
instances
=
this
.
instances
)
{
async
runInstances
(
list
:
Bot
[],
instances
=
this
.
instances
)
{
const
failedInstances
=
_
.
compact
(
const
failedInstances
=
_
.
compact
(
await
Promise
.
all
(
instances
.
map
((
instance
)
=>
instance
.
run
(
list
))),
await
Promise
.
all
(
instances
.
map
((
instance
)
=>
instance
.
run
(
list
))),
);
);
...
...
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