feat(webui): improve setup flows across chat channels (NAN-112) (#5356)
* feat(webui): improve channel setup flows * fix(webui): refine channel setup interactions (NAN-112) * fix(webui): keep email setup sections channel-owned * fix(webui): remove concrete channel details from shared components * refactor(webui): remove unused channel setup resources * fix(webui): finish channel-owned setup boundaries * fix(webui): update channel switches optimistically * test(channels): remove obsolete absence assertions * fix(webui): flatten channel instance settings disclosure * fix(webui): complete channel setup and connection flows * fix(whatsapp): wait for session database release * fix(webui): preserve scrolling channel controls * fix(webui): stage channel connection checks * fix(channels): align verification actions * fix(email): expose connection checks * fix(webui): align channel field actions * fix(email): verify account credentials * fix(wecom): bypass system proxy for websocket * fix(channels): stabilize async connection cleanup * fix(webui): autosave channel credentials * fix(email): make provider presets non-destructive * test(weixin): isolate persisted QR credentials
This commit is contained in:
1 parent
3cc3012b3a
commit
e8a29a0087
291 files changed
+12194
-3979
No files matched your search
@@ -8,13 +8,22 @@ from nanobot.channels.plugin import ChannelPlugin
|
||||
SETUP_SPEC = ChannelSetupSpec(
|
||||
fields={
|
||||
"token": field("secret"),
|
||||
"proxy": field(),
|
||||
"proxyUsername": field(),
|
||||
"proxyPassword": field("secret"),
|
||||
"allowFrom": field("list", snapshot=False),
|
||||
"allowChannels": field("list"),
|
||||
"groupPolicy": field("enum", choices=DIRECT_GROUP_POLICIES, default="mention"),
|
||||
"intents": field("int", default=37377),
|
||||
"readReceiptEmoji": field(default="👀"),
|
||||
"workingEmoji": field(default="🔧"),
|
||||
"workingEmojiDelay": field("float", default=2.0),
|
||||
"streaming": field("bool", default=True),
|
||||
},
|
||||
required=(required("token"),),
|
||||
official_url="https://discord.com/developers/applications",
|
||||
validator=validate,
|
||||
verifies_connection=True,
|
||||
)
|
||||
|
||||
PLUGIN = ChannelPlugin(
|
||||
|
||||
@@ -464,10 +464,13 @@ class DiscordChannel(BaseChannel):
|
||||
"proxy_password must be set; ignoring partial credentials",
|
||||
)
|
||||
|
||||
proxy = self.config.proxy
|
||||
if proxy and "://" not in proxy:
|
||||
proxy = f"http://{proxy}"
|
||||
self._client = DiscordBotClient(
|
||||
self,
|
||||
intents=intents,
|
||||
proxy=self.config.proxy,
|
||||
proxy=proxy,
|
||||
proxy_auth=proxy_auth,
|
||||
)
|
||||
except Exception:
|
||||
|
||||
@@ -18,11 +18,13 @@ from nanobot.channels.validation import (
|
||||
def validate(values: dict[str, Any], _context: ChannelValidationContext) -> dict[str, Any]:
|
||||
checks, missing = required_checks("discord", values)
|
||||
token = string_value(values.get("token"))
|
||||
proxy = string_value(values.get("proxy"))
|
||||
if token:
|
||||
try:
|
||||
data = http_get(
|
||||
"https://discord.com/api/v10/users/@me",
|
||||
headers={"Authorization": f"Bot {token}"},
|
||||
proxy=proxy or None,
|
||||
)
|
||||
bot_id = str(data.get("id") or "")
|
||||
checks.append(check("bot_token", "Bot token", "pass", "Discord accepted the bot token."))
|
||||
|
||||
@@ -3,17 +3,21 @@ import { chatAppGuideUrl } from "@/components/settings/channels/catalog";
|
||||
|
||||
export default {
|
||||
presentation: {
|
||||
logoUrl: "https://discord.com/favicon.ico",
|
||||
displayName: "Discord",
|
||||
initials: "DC",
|
||||
color: "#5865F2",
|
||||
logoUrl: "https://discord.com/favicon.ico",
|
||||
setup: {
|
||||
mode: "credentials",
|
||||
docsUrl: chatAppGuideUrl("discord"),
|
||||
fields: [
|
||||
{ key: "channels.discord.token" },
|
||||
{ key: "channels.discord.allowChannels" },
|
||||
{ key: "channels.discord.groupPolicy" },
|
||||
{ key: "channels.discord.token", section: "credentials" },
|
||||
{ key: "channels.discord.proxy", section: "connection" },
|
||||
{ key: "channels.discord.proxyUsername", section: "connection" },
|
||||
{ key: "channels.discord.proxyPassword", section: "connection" },
|
||||
{ key: "channels.discord.allowFrom", section: "access" },
|
||||
{ key: "channels.discord.allowChannels", section: "access" },
|
||||
{ key: "channels.discord.groupPolicy", section: "behavior" },
|
||||
],
|
||||
},
|
||||
},
|
||||
|
||||
@@ -1,26 +1,15 @@
|
||||
{
|
||||
"description": "Use nanobot from Discord servers and DMs.",
|
||||
"requirements": "Discord bot token, permissions, gateway",
|
||||
"setup": {
|
||||
"docsLabel": "Open Discord setup",
|
||||
"officialLabel": "Open Discord portal",
|
||||
"tryIt": "Mention the bot in a server or send it a direct message.",
|
||||
"summary": "Connecting Discord requires a bot token and the appropriate server permissions.",
|
||||
"steps": [
|
||||
"Create a bot in Discord Developer Portal and copy its token.",
|
||||
"Invite the bot to your server with message read/send and slash command permissions.",
|
||||
"Save and enable Discord, then mention the bot or send a direct message."
|
||||
],
|
||||
"fields": {
|
||||
"token": {
|
||||
"label": "Bot token",
|
||||
"placeholder": "Discord bot token",
|
||||
"help": "Create it from the Bot page in Discord Developer Portal."
|
||||
"placeholder": "Discord bot token"
|
||||
},
|
||||
"allowChannels": {
|
||||
"label": "Allowed channels",
|
||||
"placeholder": "Channel IDs, comma separated",
|
||||
"help": "Leave empty to allow any channel the bot can read."
|
||||
"placeholder": "Channel IDs, comma separated"
|
||||
},
|
||||
"groupPolicy": {
|
||||
"label": "Group behavior",
|
||||
@@ -33,6 +22,34 @@
|
||||
"allowFrom": {
|
||||
"label": "Allowed users",
|
||||
"placeholder": "User IDs, comma separated"
|
||||
},
|
||||
"proxy": {
|
||||
"label": "Network proxy"
|
||||
},
|
||||
"proxyUsername": {
|
||||
"label": "Proxy username"
|
||||
},
|
||||
"proxyPassword": {
|
||||
"label": "Proxy password"
|
||||
},
|
||||
"intents": {
|
||||
"label": "Gateway intents"
|
||||
},
|
||||
"readReceiptEmoji": {
|
||||
"label": "Read emoji"
|
||||
},
|
||||
"workingEmoji": {
|
||||
"label": "Working emoji"
|
||||
},
|
||||
"workingEmojiDelay": {
|
||||
"label": "Working emoji delay"
|
||||
},
|
||||
"streaming": {
|
||||
"label": "Streaming",
|
||||
"choices": {
|
||||
"true": "On",
|
||||
"false": "Off"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,26 +1,15 @@
|
||||
{
|
||||
"description": "Usa nanobot en servidores y mensajes directos de Discord.",
|
||||
"requirements": "Token del bot de Discord, permisos y pasarela",
|
||||
"setup": {
|
||||
"docsLabel": "Abrir guía de Discord",
|
||||
"officialLabel": "Abrir portal de Discord",
|
||||
"tryIt": "Menciona al bot en un servidor o envíale un mensaje directo.",
|
||||
"summary": "Para conectar Discord necesitas un token de bot y los permisos adecuados en el servidor.",
|
||||
"steps": [
|
||||
"Crea un bot en Discord Developer Portal y copia su token.",
|
||||
"Invítalo al servidor con permisos para leer/enviar mensajes y usar comandos slash.",
|
||||
"Guarda y activa Discord; después menciona al bot o envíale un mensaje directo."
|
||||
],
|
||||
"fields": {
|
||||
"token": {
|
||||
"label": "Token del bot",
|
||||
"placeholder": "Token del bot de Discord",
|
||||
"help": "Créalo desde la página Bot de Discord Developer Portal."
|
||||
"placeholder": "Token del bot de Discord"
|
||||
},
|
||||
"allowChannels": {
|
||||
"label": "Canales permitidos",
|
||||
"placeholder": "ID de canal separados por comas",
|
||||
"help": "Déjalo vacío para permitir cualquier canal que el bot pueda leer."
|
||||
"placeholder": "ID de canal separados por comas"
|
||||
},
|
||||
"groupPolicy": {
|
||||
"label": "Comportamiento en grupos",
|
||||
@@ -33,6 +22,34 @@
|
||||
"allowFrom": {
|
||||
"label": "Usuarios permitidos",
|
||||
"placeholder": "ID de usuario separados por comas"
|
||||
},
|
||||
"proxy": {
|
||||
"label": "proxy de red"
|
||||
},
|
||||
"proxyUsername": {
|
||||
"label": "Nombre de usuario proxy"
|
||||
},
|
||||
"proxyPassword": {
|
||||
"label": "Contraseña de proxy"
|
||||
},
|
||||
"intents": {
|
||||
"label": "Intentos de puerta de enlace"
|
||||
},
|
||||
"readReceiptEmoji": {
|
||||
"label": "Leer emojis"
|
||||
},
|
||||
"workingEmoji": {
|
||||
"label": "Emoji de trabajo"
|
||||
},
|
||||
"workingEmojiDelay": {
|
||||
"label": "Retraso de emoji de trabajo"
|
||||
},
|
||||
"streaming": {
|
||||
"label": "Transmisión",
|
||||
"choices": {
|
||||
"true": "encendido",
|
||||
"false": "Apagado"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,26 +1,15 @@
|
||||
{
|
||||
"description": "Utilisez nanobot sur les serveurs Discord et en messages privés.",
|
||||
"requirements": "Jeton du bot Discord, permissions et passerelle",
|
||||
"setup": {
|
||||
"docsLabel": "Ouvrir le guide Discord",
|
||||
"officialLabel": "Ouvrir le portail Discord",
|
||||
"tryIt": "Mentionnez le bot sur un serveur ou envoyez-lui un message privé.",
|
||||
"summary": "La connexion à Discord nécessite un jeton de bot et les permissions appropriées sur le serveur.",
|
||||
"steps": [
|
||||
"Créez un bot dans le portail développeur Discord et copiez son jeton.",
|
||||
"Invitez-le sur votre serveur avec les permissions de lecture, d’envoi et de commandes slash.",
|
||||
"Enregistrez et activez Discord, puis mentionnez le bot ou envoyez-lui un message privé."
|
||||
],
|
||||
"fields": {
|
||||
"token": {
|
||||
"label": "Jeton du bot",
|
||||
"placeholder": "Jeton du bot Discord",
|
||||
"help": "Créez-le depuis la page Bot du portail développeur Discord."
|
||||
"placeholder": "Jeton du bot Discord"
|
||||
},
|
||||
"allowChannels": {
|
||||
"label": "Salons autorisés",
|
||||
"placeholder": "ID de salon séparés par des virgules",
|
||||
"help": "Laissez vide pour autoriser tous les salons lisibles par le bot."
|
||||
"placeholder": "ID de salon séparés par des virgules"
|
||||
},
|
||||
"groupPolicy": {
|
||||
"label": "Comportement en groupe",
|
||||
@@ -33,6 +22,34 @@
|
||||
"allowFrom": {
|
||||
"label": "Utilisateurs autorisés",
|
||||
"placeholder": "ID utilisateur séparés par des virgules"
|
||||
},
|
||||
"proxy": {
|
||||
"label": "Mandataire réseau"
|
||||
},
|
||||
"proxyUsername": {
|
||||
"label": "Nom d'utilisateur du proxy"
|
||||
},
|
||||
"proxyPassword": {
|
||||
"label": "Mot de passe proxy"
|
||||
},
|
||||
"intents": {
|
||||
"label": "Intentions de passerelle"
|
||||
},
|
||||
"readReceiptEmoji": {
|
||||
"label": "Lire les emoji"
|
||||
},
|
||||
"workingEmoji": {
|
||||
"label": "Emoji fonctionnel"
|
||||
},
|
||||
"workingEmojiDelay": {
|
||||
"label": "Retard d'emoji fonctionnel"
|
||||
},
|
||||
"streaming": {
|
||||
"label": "Diffusion en continu",
|
||||
"choices": {
|
||||
"true": "Sur",
|
||||
"false": "Désactivé"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,26 +1,15 @@
|
||||
{
|
||||
"description": "Gunakan nanobot dari server dan DM Discord.",
|
||||
"requirements": "Token bot Discord, izin, dan gateway",
|
||||
"setup": {
|
||||
"docsLabel": "Buka panduan Discord",
|
||||
"officialLabel": "Buka portal Discord",
|
||||
"tryIt": "Sebut bot di server atau kirim pesan langsung.",
|
||||
"summary": "Untuk menghubungkan Discord, Anda memerlukan token bot dan izin yang sesuai di server.",
|
||||
"steps": [
|
||||
"Buat bot di Discord Developer Portal dan salin tokennya.",
|
||||
"Undang bot ke server dengan izin baca/kirim pesan dan perintah slash.",
|
||||
"Simpan dan aktifkan Discord, lalu sebut bot atau kirim DM."
|
||||
],
|
||||
"fields": {
|
||||
"token": {
|
||||
"label": "Token bot",
|
||||
"placeholder": "Token bot Discord",
|
||||
"help": "Buat dari halaman Bot di Discord Developer Portal."
|
||||
"placeholder": "Token bot Discord"
|
||||
},
|
||||
"allowChannels": {
|
||||
"label": "Kanal yang diizinkan",
|
||||
"placeholder": "ID kanal, dipisahkan koma",
|
||||
"help": "Kosongkan untuk mengizinkan semua kanal yang dapat dibaca bot."
|
||||
"placeholder": "ID kanal, dipisahkan koma"
|
||||
},
|
||||
"groupPolicy": {
|
||||
"label": "Perilaku grup",
|
||||
@@ -33,6 +22,34 @@
|
||||
"allowFrom": {
|
||||
"label": "Pengguna yang diizinkan",
|
||||
"placeholder": "ID pengguna, dipisahkan koma"
|
||||
},
|
||||
"proxy": {
|
||||
"label": "Proksi jaringan"
|
||||
},
|
||||
"proxyUsername": {
|
||||
"label": "Nama pengguna proksi"
|
||||
},
|
||||
"proxyPassword": {
|
||||
"label": "Kata sandi proksi"
|
||||
},
|
||||
"intents": {
|
||||
"label": "Maksud gerbang"
|
||||
},
|
||||
"readReceiptEmoji": {
|
||||
"label": "Baca emoji"
|
||||
},
|
||||
"workingEmoji": {
|
||||
"label": "Emoji yang berfungsi"
|
||||
},
|
||||
"workingEmojiDelay": {
|
||||
"label": "Penundaan emoji yang berfungsi"
|
||||
},
|
||||
"streaming": {
|
||||
"label": "Streaming",
|
||||
"choices": {
|
||||
"true": "Aktif",
|
||||
"false": "Mati"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,26 +1,15 @@
|
||||
{
|
||||
"description": "Discord サーバーと DM から nanobot を利用します。",
|
||||
"requirements": "Discord ボットトークン、権限、ゲートウェイ",
|
||||
"setup": {
|
||||
"docsLabel": "Discord 設定ガイドを開く",
|
||||
"officialLabel": "Discord ポータルを開く",
|
||||
"tryIt": "サーバーでボットをメンションするか、DM を送信します。",
|
||||
"summary": "Discord への接続には、ボットトークンとサーバー上の適切な権限が必要です。",
|
||||
"steps": [
|
||||
"Discord Developer Portal でボットを作成し、トークンをコピーします。",
|
||||
"メッセージの読み書きとスラッシュコマンド権限を付けてサーバーに招待します。",
|
||||
"保存して Discord を有効にし、メンションまたは DM を送信します。"
|
||||
],
|
||||
"fields": {
|
||||
"token": {
|
||||
"label": "ボットトークン",
|
||||
"placeholder": "Discord ボットトークン",
|
||||
"help": "Discord Developer Portal の Bot ページで作成します。"
|
||||
"placeholder": "Discord ボットトークン"
|
||||
},
|
||||
"allowChannels": {
|
||||
"label": "許可するチャンネル",
|
||||
"placeholder": "チャンネル ID(カンマ区切り)",
|
||||
"help": "空欄の場合、ボットが読めるすべてのチャンネルを許可します。"
|
||||
"placeholder": "チャンネル ID(カンマ区切り)"
|
||||
},
|
||||
"groupPolicy": {
|
||||
"label": "グループでの動作",
|
||||
@@ -33,6 +22,34 @@
|
||||
"allowFrom": {
|
||||
"label": "許可するユーザー",
|
||||
"placeholder": "ユーザー ID(カンマ区切り)"
|
||||
},
|
||||
"proxy": {
|
||||
"label": "ネットワークプロキシ"
|
||||
},
|
||||
"proxyUsername": {
|
||||
"label": "プロキシのユーザー名"
|
||||
},
|
||||
"proxyPassword": {
|
||||
"label": "プロキシパスワード"
|
||||
},
|
||||
"intents": {
|
||||
"label": "ゲートウェイの意図"
|
||||
},
|
||||
"readReceiptEmoji": {
|
||||
"label": "絵文字を読む"
|
||||
},
|
||||
"workingEmoji": {
|
||||
"label": "働く絵文字"
|
||||
},
|
||||
"workingEmojiDelay": {
|
||||
"label": "絵文字の動作遅延"
|
||||
},
|
||||
"streaming": {
|
||||
"label": "ストリーミング",
|
||||
"choices": {
|
||||
"true": "オン",
|
||||
"false": "オフ"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,26 +1,15 @@
|
||||
{
|
||||
"description": "Discord 서버와 DM에서 nanobot을 사용합니다.",
|
||||
"requirements": "Discord 봇 토큰, 권한 및 게이트웨이",
|
||||
"setup": {
|
||||
"docsLabel": "Discord 설정 가이드 열기",
|
||||
"officialLabel": "Discord 포털 열기",
|
||||
"tryIt": "서버에서 봇을 멘션하거나 DM을 보내세요.",
|
||||
"summary": "Discord에 연결하려면 봇 토큰과 서버 내 접근 권한이 필요합니다.",
|
||||
"steps": [
|
||||
"Discord Developer Portal에서 봇을 만들고 토큰을 복사하세요.",
|
||||
"메시지 읽기/보내기 및 슬래시 명령 권한으로 서버에 초대하세요.",
|
||||
"저장하고 Discord를 활성화한 다음 봇을 멘션하거나 DM을 보내세요."
|
||||
],
|
||||
"fields": {
|
||||
"token": {
|
||||
"label": "봇 토큰",
|
||||
"placeholder": "Discord 봇 토큰",
|
||||
"help": "Discord Developer Portal의 Bot 페이지에서 생성하세요."
|
||||
"placeholder": "Discord 봇 토큰"
|
||||
},
|
||||
"allowChannels": {
|
||||
"label": "허용된 채널",
|
||||
"placeholder": "채널 ID, 쉼표로 구분",
|
||||
"help": "비워 두면 봇이 읽을 수 있는 모든 채널을 허용합니다."
|
||||
"placeholder": "채널 ID, 쉼표로 구분"
|
||||
},
|
||||
"groupPolicy": {
|
||||
"label": "그룹 동작",
|
||||
@@ -33,6 +22,34 @@
|
||||
"allowFrom": {
|
||||
"label": "허용된 사용자",
|
||||
"placeholder": "사용자 ID, 쉼표로 구분"
|
||||
},
|
||||
"proxy": {
|
||||
"label": "네트워크 프록시"
|
||||
},
|
||||
"proxyUsername": {
|
||||
"label": "프록시 사용자 이름"
|
||||
},
|
||||
"proxyPassword": {
|
||||
"label": "프록시 비밀번호"
|
||||
},
|
||||
"intents": {
|
||||
"label": "게이트웨이 인텐트"
|
||||
},
|
||||
"readReceiptEmoji": {
|
||||
"label": "이모티콘 읽기"
|
||||
},
|
||||
"workingEmoji": {
|
||||
"label": "일하는 이모티콘"
|
||||
},
|
||||
"workingEmojiDelay": {
|
||||
"label": "작동하는 이모티콘 지연"
|
||||
},
|
||||
"streaming": {
|
||||
"label": "스트리밍",
|
||||
"choices": {
|
||||
"true": "켜기",
|
||||
"false": "끄기"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,26 +1,15 @@
|
||||
{
|
||||
"description": "Use o nanobot em servidores e DMs do Discord.",
|
||||
"requirements": "Token do bot Discord, permissões e gateway",
|
||||
"setup": {
|
||||
"docsLabel": "Abrir guia do Discord",
|
||||
"officialLabel": "Abrir portal do Discord",
|
||||
"tryIt": "Mencione o bot em um servidor ou envie uma mensagem direta.",
|
||||
"summary": "Para conectar o Discord, você precisa de um token de bot e das permissões adequadas no servidor.",
|
||||
"steps": [
|
||||
"Crie um bot no Discord Developer Portal e copie o token.",
|
||||
"Convide-o para o servidor com permissões de leitura/envio e comandos slash.",
|
||||
"Salve e ative o Discord; depois, mencione o bot ou envie uma DM."
|
||||
],
|
||||
"fields": {
|
||||
"token": {
|
||||
"label": "Token do bot",
|
||||
"placeholder": "Token do bot Discord",
|
||||
"help": "Crie-o na página Bot do Discord Developer Portal."
|
||||
"placeholder": "Token do bot Discord"
|
||||
},
|
||||
"allowChannels": {
|
||||
"label": "Canais permitidos",
|
||||
"placeholder": "IDs de canal separados por vírgulas",
|
||||
"help": "Deixe vazio para permitir qualquer canal que o bot consiga ler."
|
||||
"placeholder": "IDs de canal separados por vírgulas"
|
||||
},
|
||||
"groupPolicy": {
|
||||
"label": "Comportamento em grupos",
|
||||
@@ -33,6 +22,34 @@
|
||||
"allowFrom": {
|
||||
"label": "Usuários permitidos",
|
||||
"placeholder": "IDs de usuário separados por vírgulas"
|
||||
},
|
||||
"proxy": {
|
||||
"label": "Proxy de rede"
|
||||
},
|
||||
"proxyUsername": {
|
||||
"label": "Nome de usuário proxy"
|
||||
},
|
||||
"proxyPassword": {
|
||||
"label": "Senha proxy"
|
||||
},
|
||||
"intents": {
|
||||
"label": "Intenções de gateway"
|
||||
},
|
||||
"readReceiptEmoji": {
|
||||
"label": "Ler emoticons"
|
||||
},
|
||||
"workingEmoji": {
|
||||
"label": "Emoji de trabalho"
|
||||
},
|
||||
"workingEmojiDelay": {
|
||||
"label": "Atraso de emoji funcionando"
|
||||
},
|
||||
"streaming": {
|
||||
"label": "Transmissão",
|
||||
"choices": {
|
||||
"true": "Ligado",
|
||||
"false": "Desligado"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,26 +1,15 @@
|
||||
{
|
||||
"description": "Sử dụng nanobot trong máy chủ và tin nhắn riêng Discord.",
|
||||
"requirements": "Token bot Discord, quyền và gateway",
|
||||
"setup": {
|
||||
"docsLabel": "Mở hướng dẫn Discord",
|
||||
"officialLabel": "Mở cổng nhà phát triển Discord",
|
||||
"tryIt": "Nhắc bot trong máy chủ hoặc gửi tin nhắn riêng.",
|
||||
"summary": "Để kết nối Discord, bạn cần token bot và các quyền phù hợp trên máy chủ.",
|
||||
"steps": [
|
||||
"Tạo bot trong Discord Developer Portal và sao chép token.",
|
||||
"Mời bot vào máy chủ với quyền đọc/gửi tin nhắn và lệnh slash.",
|
||||
"Lưu và bật Discord, sau đó nhắc bot hoặc gửi tin nhắn riêng."
|
||||
],
|
||||
"fields": {
|
||||
"token": {
|
||||
"label": "Token bot",
|
||||
"placeholder": "Token bot Discord",
|
||||
"help": "Tạo từ trang Bot trong Discord Developer Portal."
|
||||
"placeholder": "Token bot Discord"
|
||||
},
|
||||
"allowChannels": {
|
||||
"label": "Kênh được phép",
|
||||
"placeholder": "ID kênh, phân tách bằng dấu phẩy",
|
||||
"help": "Để trống để cho phép mọi kênh bot có thể đọc."
|
||||
"placeholder": "ID kênh, phân tách bằng dấu phẩy"
|
||||
},
|
||||
"groupPolicy": {
|
||||
"label": "Hành vi trong nhóm",
|
||||
@@ -33,6 +22,34 @@
|
||||
"allowFrom": {
|
||||
"label": "Người dùng được phép",
|
||||
"placeholder": "ID người dùng, phân tách bằng dấu phẩy"
|
||||
},
|
||||
"proxy": {
|
||||
"label": "Proxy mạng"
|
||||
},
|
||||
"proxyUsername": {
|
||||
"label": "Tên người dùng proxy"
|
||||
},
|
||||
"proxyPassword": {
|
||||
"label": "Mật khẩu proxy"
|
||||
},
|
||||
"intents": {
|
||||
"label": "Ý định của cổng"
|
||||
},
|
||||
"readReceiptEmoji": {
|
||||
"label": "Đọc biểu tượng cảm xúc"
|
||||
},
|
||||
"workingEmoji": {
|
||||
"label": "Biểu tượng cảm xúc đang hoạt động"
|
||||
},
|
||||
"workingEmojiDelay": {
|
||||
"label": "Độ trễ biểu tượng cảm xúc đang hoạt động"
|
||||
},
|
||||
"streaming": {
|
||||
"label": "Truyền phát",
|
||||
"choices": {
|
||||
"true": "Bật",
|
||||
"false": "Tắt"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,26 +1,15 @@
|
||||
{
|
||||
"description": "在 Discord 服务器和私信中使用 nanobot。",
|
||||
"requirements": "Discord 机器人令牌、权限和网关",
|
||||
"setup": {
|
||||
"docsLabel": "打开 Discord 配置指南",
|
||||
"officialLabel": "打开 Discord 开发者后台",
|
||||
"tryIt": "在服务器中提及机器人,或向它发送私信。",
|
||||
"summary": "连接 Discord 需要机器人令牌,以及机器人在服务器中的相应权限。",
|
||||
"steps": [
|
||||
"在 Discord Developer Portal 中创建机器人并复制令牌。",
|
||||
"将机器人邀请到服务器,并授予读取/发送消息及斜杠命令权限。",
|
||||
"保存并启用 Discord,然后提及机器人或发送私信。"
|
||||
],
|
||||
"fields": {
|
||||
"token": {
|
||||
"label": "机器人令牌",
|
||||
"placeholder": "Discord 机器人令牌",
|
||||
"help": "从 Discord Developer Portal 的 Bot 页面创建。"
|
||||
"placeholder": "Discord 机器人令牌"
|
||||
},
|
||||
"allowChannels": {
|
||||
"label": "允许的频道",
|
||||
"placeholder": "频道 ID,用逗号分隔",
|
||||
"help": "留空则允许机器人可读取的所有频道。"
|
||||
"placeholder": "频道 ID,用逗号分隔"
|
||||
},
|
||||
"groupPolicy": {
|
||||
"label": "群组行为",
|
||||
@@ -33,6 +22,34 @@
|
||||
"allowFrom": {
|
||||
"label": "允许的用户",
|
||||
"placeholder": "用户 ID,用逗号分隔"
|
||||
},
|
||||
"proxy": {
|
||||
"label": "网络代理"
|
||||
},
|
||||
"proxyUsername": {
|
||||
"label": "代理用户名"
|
||||
},
|
||||
"proxyPassword": {
|
||||
"label": "代理密码"
|
||||
},
|
||||
"intents": {
|
||||
"label": "Gateway Intents"
|
||||
},
|
||||
"readReceiptEmoji": {
|
||||
"label": "已读表情"
|
||||
},
|
||||
"workingEmoji": {
|
||||
"label": "处理中表情"
|
||||
},
|
||||
"workingEmojiDelay": {
|
||||
"label": "处理中表情延迟"
|
||||
},
|
||||
"streaming": {
|
||||
"label": "流式输出",
|
||||
"choices": {
|
||||
"true": "开启",
|
||||
"false": "关闭"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,26 +1,15 @@
|
||||
{
|
||||
"description": "在 Discord 伺服器和私訊中使用 nanobot。",
|
||||
"requirements": "Discord 機器人權杖、權限和閘道",
|
||||
"setup": {
|
||||
"docsLabel": "開啟 Discord 設定指南",
|
||||
"officialLabel": "開啟 Discord 開發者後台",
|
||||
"tryIt": "在伺服器中提及機器人,或向它傳送私訊。",
|
||||
"summary": "連接 Discord 需要機器人權杖,以及機器人在伺服器中的適當權限。",
|
||||
"steps": [
|
||||
"在 Discord Developer Portal 中建立機器人並複製權杖。",
|
||||
"將機器人邀請到伺服器,並授予讀取/傳送訊息及斜線指令權限。",
|
||||
"儲存並啟用 Discord,然後提及機器人或傳送私訊。"
|
||||
],
|
||||
"fields": {
|
||||
"token": {
|
||||
"label": "機器人權杖",
|
||||
"placeholder": "Discord 機器人權杖",
|
||||
"help": "從 Discord Developer Portal 的 Bot 頁面建立。"
|
||||
"placeholder": "Discord 機器人權杖"
|
||||
},
|
||||
"allowChannels": {
|
||||
"label": "允許的頻道",
|
||||
"placeholder": "頻道 ID,以逗號分隔",
|
||||
"help": "留空則允許機器人可讀取的所有頻道。"
|
||||
"placeholder": "頻道 ID,以逗號分隔"
|
||||
},
|
||||
"groupPolicy": {
|
||||
"label": "群組行為",
|
||||
@@ -33,6 +22,34 @@
|
||||
"allowFrom": {
|
||||
"label": "允許的使用者",
|
||||
"placeholder": "使用者 ID,以逗號分隔"
|
||||
},
|
||||
"proxy": {
|
||||
"label": "網路代理"
|
||||
},
|
||||
"proxyUsername": {
|
||||
"label": "代理用戶名"
|
||||
},
|
||||
"proxyPassword": {
|
||||
"label": "代理密碼"
|
||||
},
|
||||
"intents": {
|
||||
"label": "Gateway Intents"
|
||||
},
|
||||
"readReceiptEmoji": {
|
||||
"label": "已讀表情"
|
||||
},
|
||||
"workingEmoji": {
|
||||
"label": "處理中表情"
|
||||
},
|
||||
"workingEmojiDelay": {
|
||||
"label": "處理中表情延遲"
|
||||
},
|
||||
"streaming": {
|
||||
"label": "串流輸出",
|
||||
"choices": {
|
||||
"true": "開啟",
|
||||
"false": "關閉"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user