forked from Jarran2R/osu-nppp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
87 lines (87 loc) · 3.85 KB
/
index.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="style.css">
<title>osu!nppp</title>
<meta property="og:title" content="osu!nppp - osu! twitch bot">
<meta property="og:description" content="osu!nppp | An osu! Twitch bot supporting !np and !nppp commands.">
<meta property="og:site_name" content="osu!nppp">
<meta property="og:image" content="https://raw.githubusercontent.com/Jarran2R/osu-nppp/main/assets/logo/osu!nppp.png">
</head>
<body>
<div class="container">
<div class="program">
<img src="assets/logo/osu!nppp.png" width="1024px"></img>
<div>
<label for="token">Token:</label><br>
<div class="row">
<input type="password" id="token" name="token" readonly="true" style="width: 512px;" required placeholder="Token">
<a href="https://id.twitch.tv/oauth2/authorize?response_type=token&client_id=dl6k4oj0aiuyymn19opsclt6xyykbc&redirect_uri=https://jarran2r.github.io/osu-nppp&scope=user%3Abot+user%3Aread%3Achat+user%3Awrite%3Achat&force_verify=true"><button type="button" id="authorize">Authorize</button></a>
</div>
</div>
<div class="row">
<div>
<label for="username">Channel:</label><br>
<input type="text" id="username" name="username" style="width: 330px;" required placeholder="Channel" oninput="makeValid()">
</div>
<div>
<label for="cooldown">Cooldown (seconds):</label><br>
<input type="text" id="cooldown" name="cooldown" value="15" style="width: 330px;" placeholder="Cooldown">
</div>
</div>
<div>
<button type="button" onclick="connectBot()" id="connect">Connect</button>
</div>
<div>
<label for="connect" id="message" name="message" class="error"></label>
</div>
<div>
<input type="checkbox" id="btmc">BTMC Mode
</div>
</div>
<div class="description">
<p>
<h2>Both osu! and tosu are REQUIRED to be open and running for the bot to work properly, otherwise the bot will eventually disconnect after sending a command.</h2><br>
All code is ran client-sided, and no information is sent/stored to any server other than Twitch.
</p>
<p>
<h2>Usage</h2>
<hr>
<ol>
<li>Click the <b>Authorize</b> button, and authorize the twitch account you want to use as the bot. The token is hidden to prevent accidental leaking.</li>
<li>Enter the name of the channel you want to listen for/respond to messages on in <b>Channel</b>.</li>
<li>Enter the command cooldown in seconds. Default: 15s</li>
<li>Click the <b>Connect</b> button.</li>
</ol>
<i>You may not change the token or channel name while the bot is connected, but you can change the cooldown.</i>
</p>
<p>
<h2>Format</h2>
<hr>
<b>!np</b>:<br>
@Sender | Artist - Title [Difficulty] (Mapper) <Mode>* +Mods** | osu.ppy.sh/b/BeatmapID<br>
<br>
<b>!nppp</b>:<br>
@Sender | Artist - Title [Difficulty] (Mapper) <Mode>* +Mods** | osu.ppy.sh/b/BeatmapID | ###pp*** / 100%: ###pp, 99%: ###pp, 98%: ###pp, 95%: ###pp, 90%: ###pp<br>
<br>
<small><i>
*Mode is only visible if it is not osu!standard.<br>
**Mods are only visible if any are selected.<br>
***Current pp, only visible if the player is currently playing a map.<br>
</i></small>
</p>
</div>
</div>
<div class="github">
Created by <a href="https://osu.ppy.sh/users/11417993">Jarran2R</a> | <a href="https://github.com/Jarran2R/osu-nppp">GitHub</a>
</div>
<div class="license">
Licenced under <a href="https://github.com/Jarran2R/osu-nppp/blob/main/LICENSE">GPL-3.0</a>
</div>
</body>
<script src="osu.js"></script>
<script src="chat.js"></script>
<script src="websocket.js"></script>
<script src="auth.js"></script>
<script src="main.js"></script>
</html>