mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-16 09:31:20 -04:00
awaa
This commit is contained in:
@@ -25,7 +25,16 @@ function createDmModerationHandlers(deps) {
|
||||
const payload = event?.payload || {};
|
||||
const requestId = payload.id;
|
||||
if (!requestId) return;
|
||||
const content = [`**Verification Request**`, `Request ID: \`${requestId}\``, `Nickname: ${sanitizeMentions(payload.nickname || 'unknown')}`, '', `React with ${APPROVE} to approve or ${DENY} to deny.`].join('\n');
|
||||
const content = [
|
||||
'**Verification Request**',
|
||||
`Request ID: \`${requestId}\``,
|
||||
`Nickname: ${sanitizeMentions(payload.nickname || 'unknown')}`,
|
||||
`Identity Key: \`${String(payload.cookieUserId || 'unknown')}\``,
|
||||
`IP: \`${String(payload.ip || 'unknown')}\``,
|
||||
`Socket: \`${String(payload.socketId || 'unknown')}\``,
|
||||
'',
|
||||
`React with ${APPROVE} to approve or ${DENY} to deny.`,
|
||||
].join('\n');
|
||||
await Promise.all(Array.from(lockdownAdminIds).map(async (adminId) => {
|
||||
try {
|
||||
const user = await client.users.fetch(String(adminId));
|
||||
@@ -44,7 +53,20 @@ function createDmModerationHandlers(deps) {
|
||||
const payload = event?.payload || {};
|
||||
const requestId = payload.id;
|
||||
if (!requestId) return;
|
||||
const content = [`**Private Rover Access Request**`, `Request ID: \`${requestId}\``, '', `React with ${APPROVE} to approve or ${DENY} to deny.`].join('\n');
|
||||
const requester = payload?.requester || {};
|
||||
const content = [
|
||||
'**Private Rover Access Request**',
|
||||
`Request ID: \`${requestId}\``,
|
||||
`Rover: ${sanitizeMentions(payload.roverName || payload.roverId || 'unknown')} (\`${String(payload.roverId || 'unknown')}\`)`,
|
||||
`Nickname: ${sanitizeMentions(requester.nickname || 'unknown')}`,
|
||||
`Role: \`${String(requester.role || 'unknown')}\``,
|
||||
`Verified: \`${requester.isVerified ? 'yes' : 'no'}\``,
|
||||
`Identity Key: \`${String(requester.cookieUserId || 'unknown')}\``,
|
||||
`IP: \`${String(requester.ip || 'unknown')}\``,
|
||||
`Socket: \`${String(requester.socketId || 'unknown')}\``,
|
||||
'',
|
||||
`React with ${APPROVE} to approve or ${DENY} to deny.`,
|
||||
].join('\n');
|
||||
await Promise.all(Array.from(lockdownAdminIds).map(async (adminId) => {
|
||||
try {
|
||||
const user = await client.users.fetch(String(adminId));
|
||||
|
||||
@@ -19,7 +19,7 @@ function createIntegrations(deps) {
|
||||
|
||||
const dm = createDmModerationHandlers({ ...deps, sanitizeMentions });
|
||||
const chat = createChatBridgeHandlers({ ...deps, clearTypingMessage, sendTypingMessage, formatWebhookUsername, getTypingId });
|
||||
const { handleBusEvent, handleReplayRequested } = createBusEventHandler({ ...deps, sendToChannel, schedulePresenceRotation, formatDuration });
|
||||
const { handleBusEvent } = createBusEventHandler({ ...deps, sendToChannel, schedulePresenceRotation, formatDuration });
|
||||
|
||||
function register() {
|
||||
client.on('typingStart', (typing) => {
|
||||
@@ -32,7 +32,6 @@ function createIntegrations(deps) {
|
||||
});
|
||||
|
||||
subscribe('*', handleBusEvent);
|
||||
subscribe('replay.requested', handleReplayRequested);
|
||||
subscribe('verification.requested', dm.sendVerificationRequestDms);
|
||||
subscribe('privateRoverAccess.requested', dm.sendPrivateRoverAccessRequestDms);
|
||||
subscribe('chat:message', chat.handleChatBridgeOutbound);
|
||||
|
||||
Reference in New Issue
Block a user