npm i omni-message
const OmniMessage = require('omni-message');
const message = new OmniMessage();
Set the mail variables all at once
message.setMailVariables({
use: BOOLEAN,
to: process.env.MAIL_RECEIVER,
mailService: process.env.MAIL_SERVICE,
mailUser: process.env.MAIL_USER,
mailPass: process.env.MAIL_PASS
});
or one by one
message.setMailUse(BOOLEAN);
message.setMailTo(process.env.MAIL_RECEIVER);
message.setMailService(process.env.MAIL_SERVICE);
message.setMailUser(process.env.MAIL_USER);
message.setMailPass(process.env.MAIL_PASS);
Set the discord variables all at once
message.setDiscordVariables({
use: BOOLEAN,
webhookURL: process.env.DISCORD_TOKEN,
});
or one by one
message.setDiscordUse(BOOLEAN);
message.setDiscordWebhookURL(process.env.DISCORD_TOKEN);
Set the slack variables all at once
omniMessage.setSlackVariables({
use: true,
token: process.env.SLACK_TOKEN,
channelId: process.env.SLACK_CHANNEL_ID
});
or one by one
omniMessage.setSlackUse(true);
omniMessage.setSlackToken(process.env.SLACK_TOKEN);
omniMessage.setSlackChannelId(process.env.SLACK_CHANNEL_ID);
- Discord
- Slack