Skip to content
This repository was archived by the owner on Aug 18, 2020. It is now read-only.

Commit 0232594

Browse files
author
Jonas
committed
Add Tipeeestream event input (See: codeoverflow-org/chatoverflow#43)
1 parent a8be4d3 commit 0232594

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package org.codeoverflow.plugins.testall.tests
2+
3+
import org.codeoverflow.chatoverflow.api.io.input.event.TipeeestreamEventInput
4+
import org.codeoverflow.chatoverflow.api.plugin.configuration.Requirement
5+
import org.codeoverflow.plugins.testall.{test, testallPlugin}
6+
7+
class tipeeestreamtest(val plugin: testallPlugin,
8+
val event: Requirement[TipeeestreamEventInput]) extends test(plugin, event) {
9+
10+
override def name: String = "TipeeeStream test"
11+
12+
override def setup(): Unit = {
13+
event.get.registerDonationEventHandler(e => log(s"${e.getInfo.getDonor.getDisplayName} donated ${e.getInfo.getFormattedAmount}"))
14+
event.get.registerFollowEventHandler(e => log(s"${e.getInfo.getFollower.getDisplayName} is now following you"))
15+
event.get.registerSubscriptionEventHandler(e => log(s"${e.getInfo.getSubscriber.getDisplayName} just subscribed. Streak: ${e.getInfo.getResub}"))
16+
}
17+
18+
override def loop(): Unit = {}
19+
20+
override def shutdown(): Unit = {}
21+
}

0 commit comments

Comments
 (0)