diff --git a/commands/BlockDomain.js b/commands/BlockDomain.js index 1a9753e0c4281c330e9f9ca436799fa2cc07aca1..e9c0d2d8cc104ae8b615e87d782125a09f4769ee 100644 --- a/commands/BlockDomain.js +++ b/commands/BlockDomain.js @@ -11,6 +11,15 @@ class BlockDomain extends CommandBase { execute(msg, args) { this.client.block_domain(args[0]); + this.client.following_list().then((result) => { + for (const account of result) { + if (account.acct.split('@')[1] === args[0]) { + this.client.unfollow(account.id); + console.log("UNFOLLOW: " + account.acct); + } + } + }); + this.client.fav(msg.status.id); } }