Skip to content

Commit

Permalink
fix: integration filter, closes #456
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiTenno committed Jul 27, 2021
1 parent 8044278 commit a68f307
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/commands/Tracking/Track.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ class Track extends Command {
try {
await message.channel.send('Setting up webhook...');
const existingWebhooks = (await message.channel.fetchWebhooks())
.filter(w => w.type === 'Incoming');
.filter(w => w.type === 'Incoming'
&& w?.owner?.id === message?.client?.user?.id
&& !!w.token);
if (existingWebhooks.size) {
const temp = existingWebhooks.first();
webhook = {
Expand Down

0 comments on commit a68f307

Please sign in to comment.