46 lines
1.8 KiB
HTML
46 lines
1.8 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||
<title>BridgeSwarm – Discord Bot</title>
|
||
<link rel="stylesheet" href="../shared/theme.css">
|
||
<link rel="stylesheet" href="../shared/chrome.css">
|
||
<link rel="stylesheet" href="style.css">
|
||
<script src="../shared/boot.js"></script>
|
||
<script>if (BridgeSwarmExamples.guardFileProtocol('discord-bot/')) { /* blocked */ }</script>
|
||
</head>
|
||
<body>
|
||
<div class="bs-page">
|
||
<a class="bs-back" href="../">← Examples</a>
|
||
<p class="bs-brand">BridgeSwarm</p>
|
||
<h1 class="bs-title">Discord Bot</h1>
|
||
<p class="bs-lede">
|
||
Full <code>discord.js</code> 14 on the Bare host, as <code>BridgeSwarm.DiscordJS</code>.
|
||
Enable Discord in extension Settings, paste a <strong>bot token</strong> (not the OAuth2 client secret),
|
||
then login. The token stays in this tab and is never written to disk by the demo.
|
||
</p>
|
||
|
||
<div id="status" class="bs-banner bs-banner--info">Checking Discord pack…</div>
|
||
|
||
<div class="bs-section">
|
||
<h2>Bot</h2>
|
||
<p class="bs-meta">Developer Portal → Bot → Reset Token. Privileged Message Content intent is optional (channel ping → pong).</p>
|
||
<div class="bs-row">
|
||
<input type="password" id="token" placeholder="Bot token" autocomplete="off">
|
||
<input type="text" id="guild" placeholder="Guild id (optional, instant slash)">
|
||
<button class="primary" id="login">Login</button>
|
||
<button class="danger" id="logout">Destroy</button>
|
||
</div>
|
||
<label class="bs-meta"><input type="checkbox" id="msgContent"> Request Message Content intent</label>
|
||
</div>
|
||
|
||
<div class="bs-section">
|
||
<h2>Log</h2>
|
||
<div class="bs-log" id="log"></div>
|
||
</div>
|
||
</div>
|
||
<script src="app.js"></script>
|
||
</body>
|
||
</html>
|