-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbot.html
44 lines (39 loc) · 1.09 KB
/
bot.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<head>
<meta charset="utf-8">
<title>봇</title>
<!-- custum css -->
</head>
<body>
<p>
코딩하고 켜두면 봇이 되는데 여러 개 켜면 지옥이 생길 수 있으니 조심<br>
이거 고칠 사람은 스스로 알아서 잘 고치겠죠?
</p>
<div id="wrapper">
</div>
<script src="./version.js"></script>
<script src="./js/onerror.js"></script>
<script src="./config/secret.js"></script>
<script src="./config/config.js"></script>
<script src="./config/chat-config.js"></script>
<script src="./lib/irc.js"></script>
<script src="./lib/twitch-irc.js"></script>
<script src="./lib/client.js"></script>
<script id="register handlers">
const client = new TwitchIrcClient(configs);
client.run();
// example echo
client.registerHandler({
/**
* say 를 호출하면 봇이 해당 내용을 로그인 토큰의 계정으로 말합니다.
* @param {TwitchIrcMessage} message
* @param {string => void} say
*/
handle(message, say) {
if (message.command !== 'PRIVMSG') return;
if (!/^echo/.test(message.text)) {
say(`echo: ${message.text}`);
}
}
});
</script>
</body>