Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Implementation:A616567126 GPT WEB JAVA DiscordAccountConfigController

From Leeroopedia
Knowledge Sources
Domains Admin_API, Discord_Configuration
Last Updated 2026-10-13 00:00 GMT

Overview

Concrete REST controller for managing Discord account configurations, including paginated queries, adding new accounts with WSS connection validation, and updating account state.

Description

The DiscordAccountConfigController exposes endpoints under `/sys/discord/account/config` for paginated Discord account queries, adding new accounts (which triggers WSS connection), and updating accounts (which reconnects or disconnects based on state). Operations delegate to `IDiscordAccountConfigService`.

Usage

Use this controller when building the admin interface for managing Discord bot accounts used by the Midjourney integration.

Code Reference

Source Location

Signature

@RestController
@RequestMapping("/sys/discord/account/config")
public class DiscordAccountConfigController {

    @RequestMapping(value = "/queryPage", method = RequestMethod.POST)
    public B<Page<DiscordAccountConfig>> queryPage(@Validated @RequestBody BasePageHelper req);

    @RequestMapping(value = "/add", method = RequestMethod.POST)
    public B<String> add(@Validated @RequestBody DiscordAccountConfigAdd req);

    @RequestMapping(value = "/update", method = RequestMethod.POST)
    public B<String> update(@Validated @RequestBody DiscordAccountConfigUpdate req);
}

Import

import com.intelligent.bot.api.sys.admin.DiscordAccountConfigController;

I/O Contract

Inputs

Name Type Required Description
req BasePageHelper Yes (query) Pagination params
req DiscordAccountConfigAdd Yes (add) channelId, guildId, botToken, etc.
req DiscordAccountConfigUpdate Yes (update) ID and updated fields

Outputs

Name Type Description
queryPage B<Page<DiscordAccountConfig>> Paginated Discord account list
add B<String> Success message with WSS connection status
update B<String> Success message with reconnection status

Usage Examples

Add Discord Account

// POST /sys/discord/account/config/add
{
    "channelId": "1111803813121232928",
    "guildId": "1111803813121232929",
    "botToken": "MTExMTgxOTM4MzM2NzU0MDc2Ng...",
    "userToken": "MTExMTgxOTM4MzM2NzU0MDc2Ng...",
    "state": 1
}
// Response: { "data": "账号信息验证成功,已连接" }

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment