From 1eaf753f6692651f4c84855d7d22aade549c0ce7 Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Tue, 14 Apr 2020 15:07:01 +0300 Subject: [PATCH] Temp crash fix --- backend/src/plugins/LocateUser.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/src/plugins/LocateUser.ts b/backend/src/plugins/LocateUser.ts index 156fd494..907e070a 100644 --- a/backend/src/plugins/LocateUser.ts +++ b/backend/src/plugins/LocateUser.ts @@ -100,7 +100,7 @@ export class LocatePlugin extends ZeppelinPlugin { @d.permission("can_where") async whereCmd(msg: Message, args: { member: Member }) { const member = await resolveMember(this.bot, this.guild, args.member.id); - sendWhere(this.guild, member, msg.channel, `${msg.member.mention} | `); + sendWhere.call(this, this.guild, member, msg.channel, `${msg.member.mention} | `); } @d.command("follow", " [reminder:string$]", { @@ -280,7 +280,7 @@ export class LocatePlugin extends ZeppelinPlugin { triggeredAlerts.forEach(alert => { const prepend = `<@!${alert.requestor_id}>, an alert requested by you has triggered!\nReminder: \`${alert.body}\`\n`; const txtChannel = this.bot.getChannel(alert.channel_id) as TextableChannel; - sendWhere(this.guild, member, txtChannel, prepend); + sendWhere.call(this, this.guild, member, txtChannel, prepend); if (alert.active) { this.moveMember(alert.requestor_id, member, txtChannel); } @@ -311,7 +311,7 @@ export class LocatePlugin extends ZeppelinPlugin { } } -export async function sendWhere(guild: Guild, member: Member, channel: TextableChannel, prepend: string) { +async function sendWhere(guild: Guild, member: Member, channel: TextableChannel, prepend: string) { const voice = guild.channels.get(member.voiceState.channelID) as VoiceChannel; if (voice == null) { @@ -330,7 +330,7 @@ export async function sendWhere(guild: Guild, member: Member, channel: TextableC } } -export async function createInvite(vc: VoiceChannel) { +async function createInvite(vc: VoiceChannel) { const existingInvites = await vc.getInvites(); if (existingInvites.length !== 0) {