File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
src/Discord/Repository/Guild Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 1717use Discord \Http \Endpoint ;
1818use Discord \Parts \Guild \Integration ;
1919use Discord \Repository \AbstractRepository ;
20+ use React \Promise \PromiseInterface ;
2021
2122/**
2223 * Contains integrations on a guild.
@@ -46,4 +47,24 @@ class IntegrationRepository extends AbstractRepository
4647 * @inheritDoc
4748 */
4849 protected $ class = Integration::class;
50+
51+ /**
52+ * Syncs an integration for the guild.
53+ *
54+ * Requires the MANAGE_GUILD permission.
55+ *
56+ * Returns a 204 empty response on success.
57+ *
58+ * Fires Guild Integrations Update and Integration Update Gateway events.
59+ *
60+ * @link https://discord.com/developers/docs/resources/guild#sync-guild-integration
61+ *
62+ * @param string $integrationId
63+ *
64+ * @return PromiseInterface
65+ */
66+ public function sync (string $ integration_id ): PromiseInterface
67+ {
68+ return $ this ->http ->post (Endpoint::bind (Endpoint::GUILD_INTEGRATION_SYNC , $ this ->vars ['guild_id ' ], $ integration_id ));
69+ }
4970}
You can’t perform that action at this time.
0 commit comments