mirror of
https://github.com/hansjone/dsh-im-ops.git
synced 2026-10-11 17:20:53 +08:00
Add Telegram and Discord IM channels
This commit is contained in:
parent
7123fce47a
commit
cb74e1c4c7
66 changed files with 8579 additions and 1910 deletions
21
plugin-src/host/channels/discord/rpc.mjs
Normal file
21
plugin-src/host/channels/discord/rpc.mjs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
import {
|
||||
TOKEN_BOT_ENDPOINTS,
|
||||
createTokenBotRpcHandler,
|
||||
installTokenBotRpc,
|
||||
} from '../shared/rpc.mjs';
|
||||
|
||||
export const DISCORD_RPC_CHANNEL = '/discord';
|
||||
export const DISCORD_ENDPOINTS = TOKEN_BOT_ENDPOINTS;
|
||||
export const DISCORD_RPC_ENDPOINTS = Object.freeze(Object.values(DISCORD_ENDPOINTS));
|
||||
|
||||
export function createDiscordRpcHandler(controller) {
|
||||
return createTokenBotRpcHandler(controller, { channel: 'Discord' });
|
||||
}
|
||||
|
||||
export function installDiscordRpc(ctx, controller, authority) {
|
||||
return installTokenBotRpc(ctx, controller, {
|
||||
channel: 'Discord',
|
||||
rpcChannel: DISCORD_RPC_CHANNEL,
|
||||
authority,
|
||||
});
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue