mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-07-14 13:57:19 +00:00
format: Prettier
This commit is contained in:
parent
70be2a2055
commit
517ce4f52f
161 changed files with 534 additions and 659 deletions
|
@ -41,7 +41,7 @@ export async function getLogMessage(
|
|||
const values = {
|
||||
...data,
|
||||
timestamp,
|
||||
userMention: async inputUserOrMember => {
|
||||
userMention: async (inputUserOrMember) => {
|
||||
if (!inputUserOrMember) return "";
|
||||
|
||||
const usersOrMembers = Array.isArray(inputUserOrMember) ? inputUserOrMember : [inputUserOrMember];
|
||||
|
@ -71,7 +71,7 @@ export async function getLogMessage(
|
|||
|
||||
return mentions.join(", ");
|
||||
},
|
||||
channelMention: channel => {
|
||||
channelMention: (channel) => {
|
||||
if (!channel) return "";
|
||||
return verboseChannelMention(channel);
|
||||
},
|
||||
|
@ -83,12 +83,12 @@ export async function getLogMessage(
|
|||
|
||||
if (type === LogType.BOT_ALERT) {
|
||||
const valuesWithoutTmplEval = { ...values };
|
||||
values.tmplEval = str => {
|
||||
values.tmplEval = (str) => {
|
||||
return renderTemplate(str, valuesWithoutTmplEval);
|
||||
};
|
||||
}
|
||||
|
||||
const renderLogString = str => renderTemplate(str, values);
|
||||
const renderLogString = (str) => renderTemplate(str, values);
|
||||
|
||||
let formatted;
|
||||
try {
|
||||
|
|
|
@ -8,7 +8,7 @@ export async function onMessageDeleteBulk(pluginData: GuildPluginData<LogsPlugin
|
|||
const channel = pluginData.guild.channels.get(savedMessages[0].channel_id);
|
||||
const archiveId = await pluginData.state.archives.createFromSavedMessages(savedMessages, pluginData.guild);
|
||||
const archiveUrl = pluginData.state.archives.getUrl(getBaseUrl(pluginData), archiveId);
|
||||
const authorIds = Array.from(new Set(savedMessages.map(item => `\`${item.user_id}\``))).join(", ");
|
||||
const authorIds = Array.from(new Set(savedMessages.map((item) => `\`${item.user_id}\``))).join(", ");
|
||||
|
||||
pluginData.state.guildLogs.log(
|
||||
LogType.MESSAGE_DELETE_BULK,
|
||||
|
|
|
@ -15,12 +15,12 @@ export async function onMessageUpdate(
|
|||
let logUpdate = false;
|
||||
|
||||
const oldEmbedsToCompare = ((oldSavedMessage.data.embeds || []) as Embed[])
|
||||
.map(e => cloneDeep(e))
|
||||
.filter(e => (e as Embed).type === "rich");
|
||||
.map((e) => cloneDeep(e))
|
||||
.filter((e) => (e as Embed).type === "rich");
|
||||
|
||||
const newEmbedsToCompare = ((savedMessage.data.embeds || []) as Embed[])
|
||||
.map(e => cloneDeep(e))
|
||||
.filter(e => (e as Embed).type === "rich");
|
||||
.map((e) => cloneDeep(e))
|
||||
.filter((e) => (e as Embed).type === "rich");
|
||||
|
||||
for (const embed of [...oldEmbedsToCompare, ...newEmbedsToCompare]) {
|
||||
if (embed.thumbnail) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue