Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
K
koishi-plugin-retweet-notifier
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-retweet-notifier
Commits
e763ac1f
Commit
e763ac1f
authored
Nov 17, 2022
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support random message
parent
734d996b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
src/config.ts
src/config.ts
+4
-3
src/index.ts
src/index.ts
+2
-2
No files found.
src/config.ts
View file @
e763ac1f
...
...
@@ -32,10 +32,11 @@ export class RetweetNotifierPluginConfig {
traceDays
:
number
;
@
SchemaProperty
({
description
:
'
发送信息。
'
,
default
:
'
帮忙给转个推~
'
,
type
:
String
,
description
:
'
发送信息,随机选一个。
'
,
default
:
[
'
帮忙给转个推~
'
,
'
帮忙转个推~
'
,
'
帮忙转个推好不好~
'
],
})
message
:
string
;
message
:
string
[]
;
}
export
type
RetweetNotifierPluginConfigLike
=
...
...
src/index.ts
View file @
e763ac1f
...
...
@@ -9,7 +9,7 @@ import {
UseModel
,
}
from
'
koishi-thirdeye
'
;
import
{
SchedulePlugin
}
from
'
koishi-schedule-send
'
;
import
{
Database
,
Quester
,
Tables
}
from
'
koishi
'
;
import
{
Database
,
Quester
,
Random
,
Tables
}
from
'
koishi
'
;
import
moment
from
'
moment
'
;
import
_
from
'
lodash
'
;
export
*
from
'
./config
'
;
...
...
@@ -135,6 +135,6 @@ export default class RetweetNotifierPlugin extends SchedulePlugin(
},
]);
return
leastRetweet
.
link
+
'
\n
'
+
this
.
config
.
message
;
return
leastRetweet
.
link
+
'
\n
'
+
Random
.
pick
(
this
.
config
.
message
)
;
}
}
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