This repository was archived by the owner on Jun 29, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall.html
More file actions
722 lines (361 loc) · 14.1 KB
/
install.html
File metadata and controls
722 lines (361 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
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
<!-- This is a static file -->
<!-- served from your routes in server.js -->
<!-- You might want to try something fancier: -->
<!-- html/nunjucks docs: https://mozilla.github.io/nunjucks/ -->
<!-- pug: https://pugjs.org/ -->
<!-- haml: http://haml.info/ -->
<!-- hbs(handlebars): http://handlebarsjs.com/ -->
<!DOCTYPE html>
<html lang="en">
<head>
<!-- COMMON TAGS -->
<meta charset="utf-8" />
<title>Glitch Discord Bot Starter Kit</title>
<!-- Search Engine -->
<meta
name="description"
content="Build a Discord Bot on Glitch with this interactive install guide"
/>
<meta
name="image"
content="https://cdn.glitch.com/ca1b081c-b4c8-41bc-bb08-91d500baeab9%2Froboticon.png"
/>
<!-- Schema.org for Google -->
<meta itemprop="name" content="Glitch Discord Bot Starter Kit" />
<meta
itemprop="description"
content="Build a Discord Bot on Glitch with this interactive install guide"
/>
<meta
itemprop="image"
content="https://cdn.glitch.com/ca1b081c-b4c8-41bc-bb08-91d500baeab9%2Froboticon.png"
/>
<!-- Twitter -->
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content="Glitch Discord Bot Starter Kit" />
<meta
name="twitter:description"
content="Build a Discord Bot on Glitch with this interactive install guide"
/>
<meta name="twitter:site" content="@glitch" />
<meta
name="twitter:image:src"
content="https://cdn.glitch.com/ca1b081c-b4c8-41bc-bb08-91d500baeab9%2Froboticon.png"
/>
<!-- Open Graph general (Facebook, Pinterest & Google+) -->
<meta name="og:title" content="Glitch Discord Bot Starter Kit" />
<meta
name="og:description"
content="Build a Discord Bot on Glitch with this interactive install guide"
/>
<meta
name="og:image"
content="http://cdn.glitch.com/ca1b081c-b4c8-41bc-bb08-91d500baeab9%2Froboticon.png"
/>
<meta name="og:url" content="http://starter-botkit-discord.glitch.me/" />
<meta name="og:type" content="website" />
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- import the webpage's stylesheet -->
<link
href="https://unpkg.com/nes.css@2.2.0/css/nes.min.css"
rel="stylesheet"
/>
<link
href="https://fonts.googleapis.com/css?family=Press+Start+2P"
rel="stylesheet"
/>
<link rel="stylesheet" href="/style.css" />
<!-- import the webpage's client-side javascript file -->
<script src="/install.js" defer></script>
</head>
<body>
<header>
<h1>Glitch Discord Bot Starter Kit</h1>
<h2>Installing Your Bot</h2>
</header>
<main>
<section>
<div class="nes-container is-light with-title">
<h2 class="title">Remix this project</h2>
<p>
Welcome to our interactive Discord Bot install guide! We highly
recommend our
<a href="https://www.youtube.com/watch?v=uv0hcWw7jdA"
><img
src="https://cdn.glitch.com/ca1b081c-b4c8-41bc-bb08-91d500baeab9%2Fyoutube-square.svg?v=1565898488946"
class="pixel-icon"
/>
intro video</a
>, after watching it you should have a general idea of what you need
to do to create your Discord bot.
</p>
<div class="nes-container with-title is-centered">
<p class="title">This Project's URL:</p>
<i class="nes-icon is-large star"></i>
<p id="project_url"></p>
</div>
</div>
</section>
<section>
<div class="nes-container is-light with-title">
<h2 class="title">Create your Discord application</h2>
<div class="message-list">
<div class="message -left">
<i class="nes-bcrikko"></i>
<!-- Balloon -->
<div class="nes-balloon from-left">
Complete these at the
<a
href="https://discordapp.com/developers/applications"
target="new"
>Discord Developer Portal</a
>
</div>
</div>
</div>
<div class="checklist">
<label>
<input type="checkbox" class="nes-checkbox" />
<span>
Login to the
<a
href="https://discordapp.com/developers/applications"
target="new"
>My Applications section of the Discord Developer Portal</a
>
</span>
</label>
<label>
<input type="checkbox" class="nes-checkbox" />
<span> Click "New Application" to create an application </span>
</label>
<label>
<input type="checkbox" class="nes-checkbox" />
<span>
Click on "Bot" on the sidebar to go to the "Bot" settings page
</span>
</label>
<label>
<input type="checkbox" class="nes-checkbox" />
<span>
Click the "Add bot" button on the "Bot" settings page
</span>
</label>
<label>
<input type="checkbox" class="nes-checkbox" />
<span>
You should see a "token" section. Click "copy" to copy the
Discord Bot Token
</span>
</label>
</div>
</div>
</section>
<section>
<div class="nes-container is-light with-title">
<h2 class="title">Discord tokens</h2>
<br />
<div class="nes-badge"><span class="is-warning">Warning!</span></div>
<div class="lists">
<ul class="nes-list is-circle">
<li>A token is a secret password</li>
<li>It can be used to hack your bot!</li>
</ul>
<div class="message-list">
<div class="message -left">
<i class="nes-bcrikko"></i>
<!-- Balloon -->
<div class="nes-balloon from-left">
Yikes so how do I keep it secure?
</div>
</div>
<div class="message -right">
<!-- Balloon -->
<div class="nes-balloon from-right">
Only put it in one place! That's the .env file!
</div>
<i class="nes-bcrikko"></i>
</div>
</div>
<br />
<p>
Your .env file might look complicated, but basically the format is
to put your secret token after the "=". Don't add any extra spaces
because that can cause errors. So let's say your Discord Bot token
is PASSWORD123. Then your .env would look like:
</p>
<pre>
<code>
GLITCH_DEBUGGER=
# Environment Config
# store your secrets and config variables in here
# only invited collaborators will be able to see your .env values
# reference these in your code with process.env.SECRET
DISCORD_TOKEN=PASSWORD123
# note: .env is a shell file so there can't be spaces around =
utm_source=starter-botkit-discord
utm_medium=button
utm_campaign=glitchButton
</code>
</pre>
<a
href=""
class="envFileLink nes-btn"
id="envFileLinkDiscord"
target="editit"
>
<i class="nes-icon is-small star"></i> Click here to go to your
<code>.env</code> file <i class="nes-icon is-small star"></i>
</a>
<br />
<div class="checklist">
<label>
<input type="checkbox" class="nes-checkbox" />
<span> Go to your .env file </span>
</label>
<label>
<input type="checkbox" class="nes-checkbox" />
<span>
Copy your Discord Bot Token next to "DISCORD_TOKEN="</span
>
</label>
</div>
</div>
<div class="nes-container is-rounded is-dark with-title">
<div class="title">Info</div>
<p>
You don't want to put tokens in <code>server.js </code> because by
default in Glitch anyone can see that file. And if you copy the
project, it will copy the file with the secure token. Yikes!
</p>
</div>
</div>
</section>
<section>
<div class="nes-container with-title">
<h2 class="title">Sign up for Uptime Robot (OPTIONAL)</h2>
<div class="message-list">
<div class="message -left">
<i class="nes-bcrikko"></i>
<!-- Balloon -->
<div class="nes-balloon from-left">What's uptime robot?</div>
</div>
<div class="message -right">
<!-- Balloon -->
<div class="nes-balloon from-right">
It's a handy service that will keep your bot running!
</div>
<i class="nes-bcrikko"></i>
</div>
</div>
<div class="lists">
<ul class="nes-list is-circle">
<li>Glitch apps automatically "sleep" after 5 minutes</li>
<li>
<a href="https://glitch.com/help/restrictions/"
>You can read more about that and other restrictions here.</a
>
</li>
<li>Sleeping bots drop out of any Discord servers they are in</li>
<li>Sleeping bots will not respond to any messages</li>
<li>
Only an external request to your bot's "site" here on Glitch
will wake it up
</li>
<li>
Uptime Robot makes requests every 5 minutes to keep your bot
awake!
</li>
</ul>
</div>
<div class="nes-container is-rounded is-dark with-title">
<div class="title">Info</div>
Some node modules can keep your bot awake, but they only will work
for a maximum of 12 hours
</div>
<div class="checklist">
<label>
<input type="checkbox" class="nes-checkbox" />
<span>
Create an Uptime Robot account at the
<a href="https://uptimerobot.com" target="new"
>Uptime Robot website</a
>
</span>
</label>
</div>
</div>
</section>
<section>
<div class="nes-container with-title">
<h2 class="title">Test your install</h2>
<p>Click the button to see if your .env is set up right!</p>
<button id="checkInstallButton" class="nes-btn">
Check Connection
</button>
<div class="info-box">
<div id="connectedSection" class="nes-container is-rounded">
<i class="nes-icon trophy is-large"></i>
<p>
Looks like your token is working! Click the refresh button to
refresh the page and see further steps for building your bot:
</p>
<button id="refreshPageButton" class="nes-btn is-primary">
Refresh!
</button>
</div>
</div>
<div class="info-box">
<div id="errorSection" class="nes-container is-rounded">
<p>
Oops look's like there might be something wrong with your
<code>.env</code> file. Check it out and then try again.
</p>
<h3>Common issues</h3>
<ul class="nes-list is-disc">
<li>Spaces between <code>=</code> and the token</li>
<li>Spaces after the token</li>
<li>Missing your Discord Bot token</li>
</ul>
</div>
</div>
<div class="info-box">
<div id="apiErrorSection" class="nes-container is-rounded">
<p>
the good news is you have a good .env file the bad news is it
doesn't recognize your token. Head to the
<a
href="https://discordapp.com/developers/applications"
target="new"
>Discord Developer Portal
</a>
to make sure you have the right one
</p>
</div>
</div>
<div class="info-box">
<div id="timedOut" class="nes-container is-rounded">
<p>
OK so this is awkward...but it appears this project is living on
a banned host. Please post the name of this Glitch app here
<a
href="https://support.glitch.com/t/discord-ban-mega-thread-the-second-discord-bot-something-took-too-long-to-do/12157"
target="support"
>this support forum thread</a
>
and we'll fix it asap!
</p>
</div>
</div>
</div>
</section>
</main>
<footer>Made with <a href="https://glitch.com">Glitch</a>!</footer>
<!-- include the Glitch button to show what the webpage is about and
to make it easier for folks to view source and remix -->
<div class="glitchButton" style="position:fixed;top:20px;right:20px;"></div>
<script src="https://button.glitch.me/button.js"></script>
</body>
</html>