Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
K
koishi-plugin-spammer
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-spammer
Commits
352a038f
Commit
352a038f
authored
Jun 20, 2022
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
migrate to reusable
parent
d6fd231a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
19 deletions
+17
-19
README.md
README.md
+14
-14
src/index.ts
src/index.ts
+3
-5
No files found.
README.md
View file @
352a038f
...
...
@@ -21,18 +21,18 @@ npm install koishi-plugin-spammer
```
yaml
# koishi.yaml
plugins
:
autopic
:
instances
:
-
paths
:
# 文件路径,一行一个。
-
./data.txt
presets
:
# 预设的消息。paths 和 presets 选择一个即可。
-
Hello!
# 下列配置详见 koishi-schedule-send
cron
:
'
18
13
*
*
*
*'
interval
:
30000
immediate
:
false
target
s
:
-
bot
:
'
onebot:1111111111
'
channels
:
-
channelId
:
'
222222222'
spammer@foo
:
paths
:
# 文件路径,一行一个。
-
./data.txt
presets
:
# 预设的消息。paths 和 presets 选择一个即可。
-
Hello!
# 下列配置详见 koishi-schedule-send
cron
:
'
18
13
*
*
*
*'
interval
:
30000
targets
:
-
bot
:
'
onebot:1111111111'
user
s
:
-
'
33333333
'
channels
:
-
channelId
:
'
222222222'
```
src/index.ts
View file @
352a038f
// import 'source-map-support/register';
import
{
SpammerConfig
}
from
'
./config
'
;
import
{
DefinePlugin
,
MultiInstancePlugin
}
from
'
koishi-thirdeye
'
;
import
{
DefinePlugin
,
Reusable
}
from
'
koishi-thirdeye
'
;
import
{
SchedulePlugin
}
from
'
koishi-schedule-send
'
;
export
*
from
'
./config
'
;
@
Reusable
()
@
DefinePlugin
()
export
class
Spammer
extends
SchedulePlugin
(
SpammerConfig
)
{
export
default
class
Spammer
extends
SchedulePlugin
(
SpammerConfig
)
{
async
send
()
{
return
this
.
config
.
getText
();
}
}
@
DefinePlugin
()
export
default
class
SpammerPlugin
extends
MultiInstancePlugin
(
Spammer
)
{}
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