File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
1
// Based on https://github.com/ut-ap2021/ap2021bot/blob/main/src/adventar/index.ts
2
2
3
- import { RTMClient } from '@slack/rtm -api' ;
3
+ import { SlackEventAdapter } from '@slack/events -api' ;
4
4
import { WebClient } from '@slack/web-api' ;
5
5
import { stripIndent } from 'common-tags' ;
6
6
import { JSDOM } from 'jsdom' ;
@@ -90,10 +90,10 @@ const saveAdventarSnapshots = async (snapshots: AdventarCalendarSnapshot[]) => {
90
90
} ;
91
91
92
92
export default async ( {
93
- rtmClient : rtm ,
93
+ eventClient ,
94
94
webClient : slack ,
95
95
} : {
96
- rtmClient : RTMClient ;
96
+ eventClient : SlackEventAdapter ;
97
97
webClient : WebClient ;
98
98
} ) : Promise < void > => {
99
99
const mutex = new Mutex ( ) ;
@@ -172,7 +172,7 @@ export default async ({
172
172
173
173
setInterval ( notifyAdventarCalendarsUpdate , 60 * 1000 ) ;
174
174
175
- rtm . on ( 'message' , async message => {
175
+ eventClient . on ( 'message' , async message => {
176
176
if ( message . channel !== process . env . CHANNEL_SANDBOX ) {
177
177
return ;
178
178
}
You can’t perform that action at this time.
0 commit comments