3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-10 20:35:02 +00:00

Reformat all files with Prettier

This commit is contained in:
Dragory 2021-09-11 19:06:51 +03:00
parent 0cde0d46d2
commit ac79eb09f5
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
206 changed files with 727 additions and 888 deletions

View file

@ -5,7 +5,7 @@ export const GuildBanRemoveAlertsEvt = locateUserEvt({
async listener(meta) {
const alerts = await meta.pluginData.state.alerts.getAlertsByUserId(meta.args.ban.user.id);
alerts.forEach(alert => {
alerts.forEach((alert) => {
meta.pluginData.state.alerts.delete(alert.id);
});
},

View file

@ -19,7 +19,7 @@ export const VoiceStateUpdateAlertEvt = locateUserEvt({
const triggeredAlerts = await meta.pluginData.state.alerts.getAlertsByUserId(memberId);
const voiceChannel = meta.args.oldState.channel!;
triggeredAlerts.forEach(alert => {
triggeredAlerts.forEach((alert) => {
const txtChannel = meta.pluginData.guild.channels.resolve(alert.channel_id as Snowflake) as TextChannel;
txtChannel.send({
content: `🔴 <@!${alert.requestor_id}> the user <@!${alert.user_id}> disconnected out of \`${voiceChannel.name}\``,

View file

@ -4,7 +4,7 @@ import { LocateUserPluginType } from "../types";
export async function fillActiveAlertsList(pluginData: GuildPluginData<LocateUserPluginType>) {
const allAlerts = await pluginData.state.alerts.getAllGuildAlerts();
allAlerts.forEach(alert => {
allAlerts.forEach((alert) => {
if (!pluginData.state.usersWithAlerts.includes(alert.user_id)) {
pluginData.state.usersWithAlerts.push(alert.user_id);
}

View file

@ -10,7 +10,7 @@ export async function sendAlerts(pluginData: GuildPluginData<LocateUserPluginTyp
const member = await resolveMember(pluginData.client, pluginData.guild, userId);
if (!member) return;
triggeredAlerts.forEach(alert => {
triggeredAlerts.forEach((alert) => {
const prepend = `<@!${alert.requestor_id}>, an alert requested by you has triggered!\nReminder: \`${alert.body}\`\n`;
const txtChannel = pluginData.guild.channels.resolve(alert.channel_id as Snowflake) as TextChannel;
sendWhere(pluginData, member, txtChannel, prepend);