forked from GlitchLib/glitchlib.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
178 lines (165 loc) · 14.1 KB
/
index.html
File metadata and controls
178 lines (165 loc) · 14.1 KB
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="msapplication-TileColor" content="#6441a4">
<meta name="theme-color" content="#ffffff">
<meta name="generator" content="Hugo 0.54.0" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#6441a4">
<link rel="stylesheet" href="/css/style.min.7af6ce4c77d40dc0befaa6c5b301be234ffb06e4d9e3a2cf4a43dda4922bb283.css" integrity="sha256-evbOTHfUDcC++qbFswG+I0/7BuTZ46LPSkPdpJIrsoM=" />
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.4.1/css/all.css" integrity="sha384-5sAR7xN1Nv6T6+dT2mhtzEpVJvfS3NScPQTrOxhwjIuvcA67KV2R5Jz6kr4abQsz" crossorigin="anonymous">
<link rel="icon" href="/favicon.ico" type="image/x-icon"/>
<title>Glitch :: Home</title><body>
<nav class="navbar fixed-top navbar-expand-md navbar-dark scrolling-navbar">
<a class="navbar-brand" href="/"><img src="/img/logo/white.svg" alt="" /></a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item"><a class="nav-link" href="/">Home</a></li>
<li class="nav-item"><a class="nav-link" href="/wiki">Wiki</a></li><li class="nav-item"><a class="nav-link" href="https://github.com/GlitchLib/glitch/releases">Releases</a></li><li class="nav-item"><a class="nav-link" href="/docs">Javadoc</a></li><li class="nav-item"><a class="nav-link" href="https://discord.gg/nJJ2fDM">Discord</a></li>
<li class="nav-item"><a class="nav-link" href="https://github.com/GlitchLib/glitch">GitHub</a></li>
</ul>
</div>
<form class="form-inline">
<div class="md-form my-0">
<input class="form-control mr-sm-2" type="text" placeholder="Search" aria-label="Search">
</div>
</form>
</nav>
<div class="view intro mb-5">
<div class="full-bg-img">
<div class="mask rgba-purple-light flex-center">
<div class="container text-center white-text wow fadeInUp">
<img src="/img/glitch-mug-typo.svg" alt=""/>
<a class="btn btn-purple" href="https://bintray.com/stachu540/GlitchLib/Glitch/_latestVersion">Dowload</a>
<a class="btn btn-outline-purple" href="/wiki">Getting Started</a>
</div>
</div>
</div>
</div>
<main role="main" class="container">
<h1 id="why-glitch">Why Glitch?</h1>
<div>
<div class="row pb-4">
<div class="col-lg-2 col-md-3 col-sm-4 text-center">
<i class="fab fa-4x fa-react" style="color:#6441a4"></i>
<h4>Reactive Streams</h4>
</div>
<div class="col-lg-10 col-md-9 col-sm-8">
<p>With <a href="https://projectreactor.io"><b>Project Reactor</b></a>, reactive streams is soo easy to use. Without blocking <code>IO</code> we can build a awesome tools using <code>JVM</code> environment.</p>
</div>
</div>
<div class="row pb-4">
<div class="col-lg-2 col-md-3 col-sm-4 text-center">
<i class="fas fa-3x fa-rocket" style="color:#6441a4"></i>
<h4>Fastet than light</h4>
</div>
<div class="col-lg-10 col-md-9 col-sm-8">
<p>With reactive streams, the response time minimalize risk throwing any <code>Exception</code>. You choose which response can will be.</p>
</div>
</div>
<div class="row pb-4">
<div class="col-lg-2 col-md-3 col-sm-4 text-center">
<i class="fab fa-4x fa-android" style="color:#6441a4"></i>
<h4>Android</h4>
</div>
<div class="col-lg-10 col-md-9 col-sm-8">
<p><code>API</code> and <code>CredentialManager</code> can be supportive for Android's. You choose what you quering request to the <code>API</code> and which user you need manage to your appliaction.</p>
</div>
</div>
<div class="row pb-4">
<div class="col-lg-2 col-md-3 col-sm-4 text-center">
<img src="/img/logo/kotlin.svg" width="56" height="56" class="pb-1" />
<h4>Kotlin</h4>
</div>
<div class="col-lg-10 col-md-9 col-sm-8">
<p>Supports <b>Kotlin</b> we will provide many options for your code. We can simplify your work, provides supports for this programming language which it is <b>Kotlin</b>.</p>
</div>
</div>
</div>
<h2 id="here-are-some-examples">Here are some examples!</h2>
<h4 id="listen-the-message">Listen the message</h4>
<p>A simple template to start, logging and <code>!ping</code> with anwsering <code>Pong!</code>?It is possible to do with this example below.</p>
<div class="highlight"><pre style="background-color:#f0f3f3;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-java" data-lang="java"><span style="color:#069;font-weight:bold">public</span> <span style="color:#069;font-weight:bold">class</span> <span style="color:#0a8;font-weight:bold">MyExampleBot</span> <span style="color:#555">{</span>
<span style="color:#069;font-weight:bold">public</span> <span style="color:#069;font-weight:bold">static</span> <span style="color:#078;font-weight:bold">void</span> <span style="color:#c0f">main</span><span style="color:#555">(</span>String<span style="color:#555">[]</span> args<span style="color:#555">)</span> <span style="color:#555">{</span>
Property properties <span style="color:#555">=</span> <span style="color:#069;font-weight:bold">new</span> Property<span style="color:#555">();</span>
<span style="color:#069;font-weight:bold">try</span> <span style="color:#555">{</span>
properties<span style="color:#555">.</span><span style="color:#309">load</span><span style="color:#555">(</span><span style="color:#c30">"glitch.properties"</span><span style="color:#555">);</span>
<span style="color:#555">}</span> <span style="color:#069;font-weight:bold">catch</span> <span style="color:#555">(</span>IOException ignore<span style="color:#555">)</span> <span style="color:#555">{}</span>
GlitchChat client <span style="color:#555">=</span> GlitchClient<span style="color:#555">.</span><span style="color:#309">builder</span><span style="color:#555">()</span>
<span style="color:#555">.</span><span style="color:#309">clientId</span><span style="color:#555">(</span>properties<span style="color:#555">.</span><span style="color:#309">getProperty</span><span style="color:#555">(</span><span style="color:#c30">"twitch.client_id"</span><span style="color:#555">))</span>
<span style="color:#555">.</span><span style="color:#309">clientSecret</span><span style="color:#555">(</span>properties<span style="color:#555">.</span><span style="color:#309">getProperty</span><span style="color:#555">(</span><span style="color:#c30">"twitch.client_secret"</span><span style="color:#555">))</span>
<span style="color:#555">.</span><span style="color:#309">buildAsync</span><span style="color:#555">().</span><span style="color:#309">flatMap</span><span style="color:#555">(</span>client <span style="color:#555">-></span> GlitchChat<span style="color:#555">.</span><span style="color:#309">builder</span><span style="color:#555">(</span>client<span style="color:#555">)</span>
<span style="color:#555">.</span><span style="color:#309">botCredentials</span><span style="color:#555">(</span>properties<span style="color:#555">.</span><span style="color:#309">getProperty</span><span style="color:#555">(</span><span style="color:#c30">"twitch.bot.access_token"</span><span style="color:#555">),</span> properties<span style="color:#555">.</span><span style="color:#309">getProperty</span><span style="color:#555">(</span><span style="color:#c30">"twitch.bot.refresh_token"</span><span style="color:#555">))</span>
<span style="color:#555">.</span><span style="color:#309">buildAsync</span><span style="color:#555">()).</span><span style="color:#309">block</span><span style="color:#555">();</span>
client<span style="color:#555">.</span><span style="color:#309">listenOn</span><span style="color:#555">(</span>MessageEvent<span style="color:#555">.</span><span style="color:#309">class</span><span style="color:#555">).</span><span style="color:#309">subscribe</span><span style="color:#555">(</span>event <span style="color:#555">-></span> <span style="color:#555">{</span>
<span style="color:#069;font-weight:bold">if</span> <span style="color:#555">(</span>event<span style="color:#555">.</span><span style="color:#309">getMessage</span><span style="color:#555">().</span><span style="color:#309">equalsIgnoreCase</span><span style="color:#555">(</span><span style="color:#c30">"!ping"</span><span style="color:#555">))</span> <span style="color:#555">{</span>
event<span style="color:#555">.</span><span style="color:#309">getChannel</span><span style="color:#555">().</span><span style="color:#309">send</span><span style="color:#555">(</span><span style="color:#c30">"Pong!"</span><span style="color:#555">);</span>
<span style="color:#555">}</span>
<span style="color:#555">});</span>
<span style="color:#555">}</span>
<span style="color:#555">}</span></code></pre></div>
<h4 id="give-him-some-power-for-ban-hammer-users">Give him some power for ban hammer users</h4>
<p>For your granting wish we provide a ban hammer power with a including methods inside the <code>MessageEvent</code>.</p>
<div class="highlight"><pre style="background-color:#f0f3f3;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-java" data-lang="java">client<span style="color:#555">.</span><span style="color:#309">listenOn</span><span style="color:#555">(</span>MessageEvent<span style="color:#555">.</span><span style="color:#309">class</span><span style="color:#555">).</span><span style="color:#309">subscribe</span><span style="color:#555">(</span>event <span style="color:#555">-></span> <span style="color:#555">{</span>
<span style="color:#069;font-weight:bold">if</span> <span style="color:#555">(</span>event<span style="color:#555">.</span><span style="color:#309">getMessage</span><span style="color:#555">().</span><span style="color:#309">match</span><span style="color:#555">(</span><span style="color:#c30">"([nN(|\|)][iI1(|)][gG]+[eEaA43][rR]*?)"</span><span style="color:#555">))</span> <span style="color:#555">{</span>
event<span style="color:#555">.</span><span style="color:#309">getUser</span><span style="color:#555">().</span><span style="color:#309">subscribe</span><span style="color:#555">(</span>user <span style="color:#555">-></span> user<span style="color:#555">.</span><span style="color:#309">ban</span><span style="color:#555">(</span>String<span style="color:#555">.</span><span style="color:#309">format</span><span style="color:#555">(</span><span style="color:#c30">"Saying: %s"</span><span style="color:#555">,</span> event<span style="color:#555">.</span><span style="color:#309">getMessage</span><span style="color:#555">()).</span><span style="color:#309">subscribe</span><span style="color:#555">()));</span>
<span style="color:#555">}</span>
<span style="color:#555">});</span></code></pre></div>
</main><footer class="page-footer font-small purple pt-4">
<div class="container text-center text-md-left">
<div class="row">
<div class="col-md-4 mt-3 d-none d-md-block text-center">
<img class="text-align-center" src="/img/logo/white.svg" alt="" height="112" style="filter: grayscale(30%);">
</div>
<hr class="clearfix w-100 d-md-none pb-3">
<div class="col-md-4 mb-md-0 mb-3">
<h5 class="text-uppercase">Links</h5>
<ul class="list-unstyled">
<li><a href="/wiki">Wiki</a></li><li><a href="https://github.com/GlitchLib/glitch/releases">Releases</a></li><li><a href="/docs">Javadoc</a></li><li><a href="https://discord.gg/nJJ2fDM">Discord</a></li>
</ul>
</div>
<div class="col-md-4 mb-md-0 mb-3">
<h5 class="text-uppercase">Badges</h5>
<ul class="list-unstyled">
<li class="my-2">
<a class="badge-align" href="https://travis-ci.com/GlitchLib/glitch">
<img src="https://travis-ci.com/GlitchLib/glitch.svg" alt="Status">
</a>
</li>
<li class="my-2">
<a class="badge-align" href="https://www.codacy.com/app/GlitchLib/glitch?utm_source=glitchlib.github.io&utm_medium=referral&utm_content=GlitchLib/glitch&utm_campaign=Badge_Grade">
<img src="https://api.codacy.com/project/badge/Grade/752be0bdadda4598ae9336d5681bc370" alt="Quality" />
</a>
</li>
<li class="my-2">
<a class="badge-align" href="https://discord.gg/jy9BKGq">
<img src="https://discordapp.com/api/guilds/325552783787032576/widget.png" alt="Twitch API">
</a>
</li>
<li class="my-2">
<a class="badge-align" href="https://discord.gg/nJJ2fDM">
<img src="https://discordapp.com/api/guilds/488285226452385792/widget.png" alt="Glitch Discord">
</a>
</li>
</ul>
</div>
</div>
</div>
<div class="footer-copyright text-center py-3">
Made with <span style="color: #e25555;">❤️</span> by <a href="https://github.com/stachu540">Damian Staszewski</a>
</div>
</footer>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.4/umd/popper.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.3/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/js/mdb.min.js"></script>
<script type="text/javascript" src="/js/search.min.7ec98d7ddd396ee43275232ee9dab83d4780a05c45e8e621888e0362291aeb35.js"></script></body>
</html>