mirror of
https://github.com/janderedev/automod.git
synced 2024-12-22 02:35:27 +00:00
allow bridge to be one-way only
This commit is contained in:
parent
3dc10d34a4
commit
0582b388bd
|
@ -122,6 +122,8 @@ client.on("messageCreate", async (message) => {
|
|||
return logger.debug(`Discord: No Revolt channel associated`);
|
||||
if (message.system && bridgeCfg.config?.disable_system_messages)
|
||||
return logger.debug(`Discord: Not bridging system message`);
|
||||
if (bridgeCfg.config?.read_only_discord)
|
||||
return logger.debug(`Discord: Channel is marked as read only`);
|
||||
|
||||
const channel = revoltClient.channels.get(bridgeCfg.revolt);
|
||||
if (!channel)
|
||||
|
|
|
@ -151,6 +151,8 @@ client.on("message", async (message) => {
|
|||
return logger.debug(
|
||||
`Revolt: System message bridging disabled; ignoring`
|
||||
);
|
||||
if (bridgeCfg?.config?.read_only_revolt)
|
||||
return logger.debug(`Revolt: Channel is marked as read only`);
|
||||
if (!bridgeCfg?.discord)
|
||||
return logger.debug(`Revolt: No Discord channel associated`);
|
||||
if (!bridgeCfg.discordWebhook) {
|
||||
|
|
|
@ -15,4 +15,12 @@ export const CONFIG_KEYS = {
|
|||
description:
|
||||
"If enabled, system messages (e.g. join/leave events) won't be bridged.",
|
||||
},
|
||||
read_only_revolt: {
|
||||
friendlyName: "Revolt read only",
|
||||
description: "Don't bridge Revolt messages to Discord",
|
||||
},
|
||||
read_only_discord: {
|
||||
friendlyName: "Discord read only",
|
||||
description: "Don't bridge Discord messages to Revolt",
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue